Skip to main content

prefect.server.services.cancellation_cleanup

The CancellationCleanup service. Responsible for cancelling tasks and subflows that haven’t finished.

Functions

cancelling_timeout_check_key

schedule_cancelling_timeout_check

maybe_schedule_cancelling_timeout_check_for_state

cancel_child_task_runs

Cancel child task runs of a cancelled flow run (docket task).

cancel_subflow_run

Cancel a subflow run whose parent flow run was cancelled (docket task).

handle_cancelling_timeout

Handle a scheduled CANCELLING timeout check for a single flow run.

ensure_cancelling_timeout_checks

Seed Docket timeout checks for flow runs already in CANCELLING.

monitor_cancelled_flow_runs

Monitor for cancelled flow runs and schedule child task cancellation.

monitor_subflow_runs

Monitor for subflow runs that need to be cancelled.