File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -217,7 +217,7 @@ def _cancel(
217217 activity .cancellation_details .details = (
218218 temporalio .activity .ActivityCancellationDetails ._from_proto (cancel .details )
219219 )
220- activity .cancel (cancelled_by_request = cancel .details .is_cancelled )
220+ activity .cancel (cancelled_by_request = cancel .details .is_cancelled or cancel . details . is_worker_shutdown )
221221
222222 def _heartbeat (self , task_token : bytes , * details : Any ) -> None :
223223 # We intentionally make heartbeating non-async, but since the data
@@ -494,7 +494,8 @@ async def _run_activity(
494494 )
495495 await self ._data_converter .encode_failure (
496496 temporalio .exceptions .ApplicationError (
497- "Unhandled activity cancel error produced by activity pause"
497+ type = "ActivityPause" ,
498+ message = "Unhandled activity cancel error produced by activity pause"
498499 ),
499500 completion .result .failed .failure ,
500501 )
You can’t perform that action at this time.
0 commit comments