Interrupt a Workflow Execution - Python SDK feature guide
How to interrupt a Workflow Execution using the Temporal Python SDK.
You can interrupt a Workflow Execution in one of the following ways:
The following are the main differences between canceling and terminating a Workflow in Temporal:
Cancel
Canceling a Workflow provides a graceful way to stop Workflow Execution.
This action resembles sending a SIGTERM
to a process.
- The system records a
WorkflowExecutionCancelRequested
event in the Workflow History. - A Workflow Task gets scheduled to process the cancelation.
- The Workflow code can handle the cancelation and execute any cleanup logic.
- The system doesn't forcefully stop the Workflow.
For more information, see How to cancel a Workflow Execution.