prefect.runner
runner
prefect.runner.runner
Runners are responsible for managing the execution of all deployments.
When creating a deployment using either flow.serve
or the serve
utility,
they also will poll for scheduled runs.
Example:
Classes
ProcessMapEntry
Runner
Methods:
handle_sigterm
Gracefully shuts down the runner when a SIGTERM is received.
execute_in_background
Executes a function in the background.
reschedule_current_flow_runs
Reschedules all flow runs that are currently running.
This should only be called when the runner is shutting down because it kill all child processes and short-circuit the crash detection logic.
has_slots_available
Determine if the flow run limit has been reached.
Returns:
-
- bool: True if the limit has not been reached, False otherwise.