This commit is contained in:
Tomas Kopecek 2018-10-04 12:23:47 +02:00 committed by Mike McLean
parent 009081c0fc
commit ccf1c41274
2 changed files with 3 additions and 3 deletions

View file

@ -802,14 +802,14 @@ class TaskManager(object):
#about). This will happen after a daemon restart, for example.
self.logger.info("freeing stale tasks: %r" % stale)
self.session.host.freeTasks(stale)
for id, pid in self.pids.items():
for id, pid in list(self.pids.items()):
if self._waitTask(id, pid):
# the subprocess handles most everything, we just need to clear things out
if self.cleanupTask(id, wait=False):
del self.pids[id]
if id in self.tasks:
del self.tasks[id]
for id, pid in self.pids.items():
for id, pid in list(self.pids.items()):
if id not in tasks:
# expected to happen when:
# - we are in the narrow gap between the time the task