Serge Shmygelskyy
11/10/2025, 10:20 AMdeployments:
- name: "backup_uploader_uat"
description: "UAT environment nightly backup uploader"
work_pool:
name: "gos"
work_queue_name: "uat"
parameters:
env: "uat"
schedule:
cron: "22 3 * * *"
timezone: "America/Regina"
but the deployment is never registered with the queue, prefect deployment inspect backup_uploader_flow/backup_uploader_uat always shows 'work_queue_id': None,Marvin
11/10/2025, 10:20 AMcheck_cli_command
📊 Tools used:
• check_cli_command (1x)Marvin
11/10/2025, 10:25 AMwork_queue_name.
- A worker can poll one or more specific queues with `-q/--work-queue`; if you omit -q, it will poll all queues in the pool.
Start a worker for a specific pool/queue
prefect worker start --pool my-pool -q my-queue
(repeat -q to poll multiple queues)
Create a deployment (Python) that targets a queue
from prefect import flow
@flow
def my_flow():
...
if __name__ == "__main__":
my_flow.deploy(
name="my-deployment",
work_pool_name="my-pool",
work_queue_name="my-queue",
)
Run the deployment
prefect deployment run "my_flow/my-deployment" --watch
Inspect the deployment (to confirm its queue)
prefect deployment inspect "my_flow/my-deployment"
Notes and differences from 2.x
- Agents were replaced by workers; use prefect worker start instead of prefect agent start.
- Deployment.build_from_flow() and prefect deployment build were removed; use .deploy() in code or prefect deploy.
- Workers can be restricted to specific queues via repeated -q flags.
Docs for more detail:
- Work pools and queues in Prefect 3.x
- Deploy via Python (`flow.deploy` with `work_queue_name`)
- Worker CLI reference
If you’re seeing runs stay in Pending, check:
- The worker is running on the correct pool and queue (--pool and -q match).
- The queue isn’t paused.
- The worker type matches the work pool type (e.g., Docker/Kubernetes).
- Any queue filters (tags/deployment IDs) aren’t excluding your deployment.
Share your deployment snippet and the worker command you’re using and I’ll help you wire it up.Serge Shmygelskyy
11/10/2025, 10:55 AMprefect worker start --pool "gos" --work-queue "uat"
and here is my prefect.yaml:
description: "Nightly backup uploader flow (UAT & PROD)"
entrypoint: "prefect_backup_uploader.py:backup_uploader_flow"
version: 1.0.0
deployments:
- name: "backup_uploader_uat"
description: "UAT environment nightly backup uploader"
work_pool:
name: "gos"
work_queue_name: "uat"
parameters:
env: "uat"
schedule:
cron: "22 3 * * *"
`timezone: "America/Regin`a"Serge Shmygelskyy
11/10/2025, 12:03 PMSerge Shmygelskyy
11/13/2025, 9:10 AM