Restart find optional files algorithm if new task started since running the function
This commit is contained in:
parent
988d169687
commit
e85efe2c64
1 changed files with 4 additions and 0 deletions
|
@ -356,6 +356,10 @@ class WorkerManager(object):
|
|||
if len(found) < len(optional_hash_ids):
|
||||
self.log.debug("No findhash result for optional files: %s" % (optional_hash_ids - set(found)))
|
||||
|
||||
if time_tasks != self.time_task_added: # New task added since start
|
||||
self.log.debug("New task since start, restarting...")
|
||||
gevent.spawn_later(0.1, self.startFindOptional)
|
||||
|
||||
# Stop all worker
|
||||
def stopWorkers(self):
|
||||
for worker in self.workers.values():
|
||||
|
|
Loading…
Reference in a new issue