Back to Prefect

Worker

docs/v3/api-ref/cli/worker.mdx

3.7.9.dev51.6 KB
Original Source

prefect worker

command
prefect worker [OPTIONS] COMMAND [ARGS]...
<Info> Start and interact with workers. </Info>

prefect worker start

command
prefect worker start [OPTIONS]
<Info> Start a worker process to poll a work pool for flow runs. </Info> <AccordionGroup> <Accordion title="Options" defaultOpen> <ResponseField name="--name"> The name to give to the started worker. </ResponseField> <ResponseField name="--pool"> The work pool the started worker should poll. </ResponseField> <ResponseField name="--work-queue"> Work queue names to pull from (repeatable). </ResponseField> <ResponseField name="--type"> The type of worker to start. </ResponseField> <ResponseField name="--prefetch-seconds"> Seconds to look ahead for scheduled flow runs. [from PREFECT_WORKER_PREFETCH_SECONDS] </ResponseField> <ResponseField name="--run-once"> Only run worker polling once. </ResponseField> <ResponseField name="--limit"> Maximum concurrent flow runs. </ResponseField> <ResponseField name="--with-healthcheck"> Start a healthcheck server. </ResponseField> <ResponseField name="--install-policy"> Install policy for worker packages. </ResponseField> <ResponseField name="--base-job-template"> Path to JSON file containing base job template. </ResponseField> <ResponseField name="--create-pool-if-not-found"> Create the work pool if it does not exist. Set to false when the work pool is managed externally (e.g. via Terraform or another provisioning tool). </ResponseField> </Accordion> </AccordionGroup>