prefect.server.services.cancellation_cleanup
The CancellationCleanup service. Responsible for cancelling tasks and subflows that haven’t finished.
Classes
CancellationCleanup
Cancels tasks and subflows of flow runs that have been cancelled
Methods:
clean_up_cancelled_flow_run_task_runs
clean_up_cancelled_subflow_runs
run_once
- cancels active tasks belonging to recently cancelled flow runs
- cancels any active subflow that belongs to a cancelled flow
run_once
LoopService().start(loops=1)
instead of LoopService().run_once()
, because this method will not invoke setup
and teardown methods properly.
service_settings
start
stop
block
: if True, blocks until the service is finished running. Otherwise it requests a stop and returns but the service may still be running a final loop.