forked from shaba/openuds
fixed bug on wait for tasks
This commit is contained in:
parent
6f90a7ce83
commit
e7fe802b1d
@ -158,7 +158,7 @@ def addTaskToWait(taks: typing.Any, includeSubprocess: bool = False) -> None:
|
|||||||
|
|
||||||
def waitForTasks() -> None:
|
def waitForTasks() -> None:
|
||||||
logger.debug('Started to wait %s', _tasksToWait)
|
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)
|
logger.debug('Waiting for task %s, subprocess wait: %s', task, waitForSubp)
|
||||||
try:
|
try:
|
||||||
if hasattr(task, 'join'):
|
if hasattr(task, 'join'):
|
||||||
|
Loading…
Reference in New Issue
Block a user