prefect.workers.process
my-work-pool
with the name of the work pool you want the worker
to poll for flow runs.
For more information about work pools and workers,
checkout out the Prefect docs.
ProcessJobConfiguration
from_template_and_values
is_using_a_runner
json_template
prepare_for_flow_run
prepare_for_flow_run
flow_run
: The flow run to be executed.deployment
: The deployment that the flow run is associated with.flow
: The flow that the flow run is associated with.work_pool
: The work pool that the flow run is running in.worker_name
: The name of the worker that is submitting the flow run.validate_working_dir
ProcessVariables
model_json_schema
ProcessWorkerResult
ProcessWorker
run
start
run_once
is set, the worker will only run each loop once and then return.
If with_healthcheck
is set, the worker will start a healthcheck server which
can be used to determine if the worker is still polling for flow runs and restart
the worker if necessary.
Args:
run_once
: If set, the worker will only run each loop once then return.with_healthcheck
: If set, the worker will start a healthcheck server.printer
: A print
-like function where logs will be reported.