Documentation Index
Fetch the complete documentation index at: https://docs.prefect.io/llms.txt
Use this file to discover all available pages before exploring further.
prefect.server.services.cancellation_cleanup
The CancellationCleanup service. Responsible for cancelling tasks and subflows that haven’t finished.
Functions
cancel_child_task_runs
cancel_child_task_runs(flow_run_id: Annotated[UUID, Logged]) -> None
Cancel child task runs of a cancelled flow run (docket task).
cancel_subflow_run
cancel_subflow_run(subflow_run_id: Annotated[UUID, Logged]) -> None
Cancel a subflow run whose parent flow run was cancelled (docket task).
monitor_cancelled_flow_runs
monitor_cancelled_flow_runs(docket: Docket = CurrentDocket(), db: PrefectDBInterface = Depends(provide_database_interface), perpetual: Perpetual = Perpetual(automatic=False, every=datetime.timedelta(seconds=get_current_settings().server.services.cancellation_cleanup.loop_seconds))) -> None
Monitor for cancelled flow runs and schedule child task cancellation.
monitor_subflow_runs
monitor_subflow_runs(docket: Docket = CurrentDocket(), db: PrefectDBInterface = Depends(provide_database_interface), perpetual: Perpetual = Perpetual(automatic=False, every=datetime.timedelta(seconds=get_current_settings().server.services.cancellation_cleanup.loop_seconds))) -> None
Monitor for subflow runs that need to be cancelled.