Skip to content

Commit 888efc8

Browse files
author
Andrei Neagu
committed
added missing
1 parent d5dab8f commit 888efc8

File tree

1 file changed

+8
-2
lines changed
  • packages/service-library/src/servicelib/long_running_tasks

1 file changed

+8
-2
lines changed

packages/service-library/src/servicelib/long_running_tasks/_lrt_server.py

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -67,15 +67,21 @@ async def _get_transferarble_task_result(
6767
task_id, with_task_context=task_context
6868
)
6969
await long_running_manager.tasks_manager.remove_task(
70-
task_id, with_task_context=task_context, reraise_errors=False
70+
task_id,
71+
with_task_context=task_context,
72+
wait_for_removal=True,
73+
reraise_errors=False,
7174
)
7275
return task_result
7376
except (TaskNotFoundError, TaskNotCompletedError):
7477
raise
7578
except Exception:
7679
# the task shall be removed in this case
7780
await long_running_manager.tasks_manager.remove_task(
78-
task_id, with_task_context=task_context, reraise_errors=False
81+
task_id,
82+
with_task_context=task_context,
83+
wait_for_removal=True,
84+
reraise_errors=False,
7985
)
8086
raise
8187

0 commit comments

Comments
 (0)