Fix installing requirements
This commit is contained in:
+2
-1
@@ -28,11 +28,12 @@ class WorkersManager:
|
||||
for (worker_name, worker_config) in config.items():
|
||||
module_obj = importlib.import_module("workers.%s" % worker_name)
|
||||
klass = getattr(module_obj, "%sWorker" % worker_name.title())
|
||||
worker_obj = klass(**worker_config['args'])
|
||||
|
||||
if module_obj.REQUIREMENTS is not None:
|
||||
cls._pip_install_helper(module_obj.REQUIREMENTS)
|
||||
|
||||
worker_obj = klass(**worker_config['args'])
|
||||
|
||||
if 'update_interval' in worker_config:
|
||||
_LOGGER.debug("Added: %s with %d seconds interval" % (worker_name, worker_config['update_interval']))
|
||||
_WORKERS_QUEUE.put(cls.Command(worker_obj.status_update, []))
|
||||
|
||||
Reference in New Issue
Block a user