Python SDK, workflow terminated but activity still running

Hi,

Im testing out new python sdk for temporal worker, and facing this issue:

  • workflow terminated but activity still running…

is this a bug? or should i handle activity termination as well?

thank you!

error message:

2023-03-15T06:41:31.106647719Z 2023-03-15T06:41:31.106348Z  
WARN temporal_sdk_core::worker::activities: 
Activity not found on completion. 
This may happen if the activity has already been cancelled but completed anyway

Temporal doesn’t terminate running activities automatically, the only way for an activity to get notified of cancellation e.g when explicitly cancelled by the workflow or when the workflow has completely is by heartbeating.
For long running activities, we recommend setting a heartbeat timeout so Temporal can detect when your worker goes away sooner and schedule the next attempt.