prefect.workers.base
BaseJobConfiguration
from_template_and_values
is_using_a_runner
json_template
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.BaseVariables
model_json_schema
BaseWorkerResult
BaseWorker
client
get_all_available_worker_types
get_and_submit_flow_runs
get_default_base_job_template
get_description
get_documentation_url
get_flow_run_logger
get_logo_url
get_name_slug
get_status
get_worker_class_from_type
is_worker_still_polling
query_interval_seconds
is the same value that is used by
the loop services - we will evaluate if the _last_polled_time
was within that interval x 30 (so 10s -> 5m)
The instance property self._last_polled_time
is currently set/updated in get_and_submit_flow_runs()
limiter
run
setup
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.submit
flow
: The flow to submitparameters
: The parameters to pass to the flowsync_with_backend
teardown
work_pool