Skip to content

Commit c091814

Browse files
authored
@pcrespov review
1 parent 535b0b9 commit c091814

File tree

1 file changed

+1
-0
lines changed
  • packages/service-library/src/servicelib/long_running_tasks

1 file changed

+1
-0
lines changed

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

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -335,6 +335,7 @@ async def _tasks_monitor(self) -> None:
335335
result_field = ResultField(
336336
str_error=dumps(TaskCancelledError(task_id=task_id))
337337
)
338+
# NOTE: if the task is itself cancelled it shall re-raise: see https://superfastpython.com/asyncio-cancellederror-consumed/
338339
current_task = asyncio.current_task()
339340
assert current_task is not None # nosec
340341
if current_task.cancelling() > 0:

0 commit comments

Comments
 (0)