Start new workers if lots of tasks left

This commit is contained in:
shortcutme 2017-06-19 15:36:07 +02:00
parent d607696a75
commit c5d90ddd19
No known key found for this signature in database
GPG key ID: 5B63BAE6CB9613AE

View file

@ -100,6 +100,9 @@ class WorkerManager(object):
self.startWorkers()
break # One reannounce per loop
if len(self.tasks) > len(self.workers) * 2 and len(self.workers) < self.getMaxWorkers():
self.startWorkers()
self.log.debug("checkTasks stopped running")
# Returns the next free or less worked task