sdk-core
sdk-core copied to clipboard
[Feature Request] Auto cancel activities after they timeout
Currently Core relies on the server to detect when an activity times out, requiring activity implementations to heartbeat in order to get cancelled.
Core should copy the behavior from the Go SDK and automatically cancel activities that exceed their schedule-to-close or start-to-close timeouts.
Since Core decouples cancellation and heartbeats, this change would improve the DX for all Core based SDKs, especially for languages with built-in cancellation mechanisms such as Python and .NET (Python even more since cancellation is implicit).
automatically cancel activities
To confirm - "cancel" from a lang POV but do not return an activity task completion so we don't race against server timeout in some way, right?
Also this assumes we'll won't allow activity options to be altered server side (or at least requires that we come back and change this if we do).
Yes, cancel from a lang POV, I agree this requires clarification. I don’t see a good reason to report back to the server.
Also good point about changing activity options, we can potentially address that when we add the capability.