make worker check_config method optionnal

This commit is contained in:
Benoit Chesneau 2015-03-06 10:10:42 +01:00
parent e5f6b8024d
commit eb485d2134

View File

@ -135,7 +135,8 @@ class Arbiter(object):
self.log.info("Using worker: %s", self.cfg.worker_class_str)
# check worker class requirements
self.worker_class.check_config(self.cfg, self.log)
if hasattr(self.worker_class, "check_config"):
self.worker_class.check_config(self.cfg, self.log)
self.cfg.when_ready(self)