fixed bug on wait for tasks

This commit is contained in:
Adolfo Gómez García 2021-06-21 17:39:35 +02:00
parent 6f90a7ce83
commit e7fe802b1d

View File

@ -158,7 +158,7 @@ def addTaskToWait(taks: typing.Any, includeSubprocess: bool = False) -> None:
def waitForTasks() -> None:
logger.debug('Started to wait %s', _tasksToWait)
for task, waitForSubp in _tasksToWait:
for task, waitForSubp in sorted(_tasksToWait, key=lambda x: int(x[1])):
logger.debug('Waiting for task %s, subprocess wait: %s', task, waitForSubp)
try:
if hasattr(task, 'join'):