File tree 1 file changed +6
-2
lines changed
1 file changed +6
-2
lines changed Original file line number Diff line number Diff line change @@ -217,7 +217,10 @@ def _cancel(
217
217
activity .cancellation_details .details = (
218
218
temporalio .activity .ActivityCancellationDetails ._from_proto (cancel .details )
219
219
)
220
- activity .cancel (cancelled_by_request = cancel .details .is_cancelled )
220
+ activity .cancel (
221
+ cancelled_by_request = cancel .details .is_cancelled
222
+ or cancel .details .is_worker_shutdown
223
+ )
221
224
222
225
def _heartbeat (self , task_token : bytes , * details : Any ) -> None :
223
226
# We intentionally make heartbeating non-async, but since the data
@@ -494,7 +497,8 @@ async def _run_activity(
494
497
)
495
498
await self ._data_converter .encode_failure (
496
499
temporalio .exceptions .ApplicationError (
497
- "Unhandled activity cancel error produced by activity pause"
500
+ type = "ActivityPause" ,
501
+ message = "Unhandled activity cancel error produced by activity pause" ,
498
502
),
499
503
completion .result .failed .failure ,
500
504
)
You can’t perform that action at this time.
0 commit comments