<@ULVA73B9P>, I have a deployment with the work qu...
# ask-marvin
s
@Marvin, I have a deployment with the work queue configured:
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/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,
m
🔄 Researching your answer... this may take a while 🔧 Using tool:
check_cli_command
📊 Tools used: •
check_cli_command
(1x)
Got it — you’ve got a deployment configured with a specific work queue. What would you like to do next: start a worker that polls that queue, or troubleshoot runs that aren’t being picked up? If you can share your deployment name, work pool, work queue, and the exact worker start command you’re using, I can be precise. Quick reference for Prefect 3.x: - A deployment can target a specific work queue via
work_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
Copy code
prefect worker start --pool my-pool -q my-queue
(repeat
-q
to poll multiple queues) Create a deployment (Python) that targets a queue
Copy code
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
Copy code
prefect deployment run "my_flow/my-deployment" --watch
Inspect the deployment (to confirm its queue)
Copy code
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.
s
started the worker like this:
prefect 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"
Nothing helps, the work_queue_id is still None
This was a defect, now seems to be fixed; I am waiting for the release