Skip to content

Commit 9a12b19

Browse files
committed
Fix swallowed CancelledError in start_child_workflow and Nexus operations (Issue #1445)
1 parent 7e36940 commit 9a12b19

1 file changed

Lines changed: 3 additions & 0 deletions

File tree

temporalio/worker/_workflow_instance.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2017,6 +2017,7 @@ async def run_child() -> Any:
20172017
return handle
20182018
except asyncio.CancelledError:
20192019
apply_child_cancel_error()
2020+
raise
20202021

20212022
async def _outbound_start_nexus_operation(
20222023
self, input: StartNexusOperationInput[Any, OutputT]
@@ -2043,6 +2044,7 @@ async def operation_handle_fn() -> OutputT:
20432044
except asyncio.CancelledError:
20442045
cancel_command = self._add_command()
20452046
handle._apply_cancel_command(cancel_command)
2047+
raise
20462048

20472049
handle = _NexusOperationHandle(
20482050
self, self._next_seq("nexus_operation"), input, operation_handle_fn()
@@ -2057,6 +2059,7 @@ async def operation_handle_fn() -> OutputT:
20572059
except asyncio.CancelledError:
20582060
cancel_command = self._add_command()
20592061
handle._apply_cancel_command(cancel_command)
2062+
raise
20602063

20612064
#### Miscellaneous helpers ####
20622065
# These are in alphabetical order.

0 commit comments

Comments
 (0)