Skip to content

Commit 535b0b9

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

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

packages/service-library/src/servicelib/deferred_tasks/_worker_tracker.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -57,6 +57,7 @@ async def handle_run(
5757
result_to_return = TaskResultSuccess(value=task_result)
5858
except asyncio.CancelledError:
5959
result_to_return = TaskResultCancelledError()
60+
# NOTE: if the task is itself cancelled it shall re-raise: see https://superfastpython.com/asyncio-cancellederror-consumed/
6061
current_task = asyncio.current_task()
6162
assert current_task is not None # nosec
6263
if current_task.cancelling() > 0:

0 commit comments

Comments
 (0)