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:
add_deployment
deployment
: A deployment for the runner to register.
add_flow
flow
: A flow for the runner to run.name
: The name to give the created deployment. Will default to the name of the runner.interval
: An interval on which to execute the current flow. Accepts either a number or a timedelta object. If a number is given, it will be interpreted as seconds.cron
: A cron schedule of when to execute runs of this flow.rrule
: An rrule schedule of when to execute runs of this flow.paused
: Whether or not to set the created deployment as paused.schedule
: A schedule object defining when to execute runs of this deployment. Used to provide additional scheduling options liketimezone
orparameters
.schedules
: A list of schedule objects defining when to execute runs of this flow. Used to define multiple schedules or additional scheduling options liketimezone
.concurrency_limit
: The maximum number of concurrent runs of this flow to allow.triggers
: A list of triggers that should kick of a run of this flow.parameters
: A dictionary of default parameter values to pass to runs of this flow.description
: A description for the created deployment. Defaults to the flow’s description if not provided.tags
: A list of tags to associate with the created deployment for organizational purposes.version
: A version for the created deployment. Defaults to the flow’s version.entrypoint_type
: Type of entrypoint to use for the deployment. When using a module path entrypoint, ensure that the module will be importable in the execution environment.
cancel_all
execute_bundle
execute_flow_run
- The flow run process.
execute_in_background
handle_sigterm
has_slots_available
-
- bool: True if the limit has not been reached, False otherwise.
reschedule_current_flow_runs
start
run_once
: If True, the runner will through one query loop and then exit.webserver
: a boolean for whether to start a webserver for this runner. If provided, overrides the default on the runner