<@ULVA73B9P> how can i check if the worker is poll...
# ask-marvin
a
@Marvin how can i check if the worker is polling the queue?
m
thought for 230.4 seconds
Here are a few quick ways to confirm a worker is polling a work queue in Prefect 3.x: 1) Check the UI - Work Pools > select your pool: - Work queues: look at “Last polled” and the status indicator. If it’s being polled regularly (typically within the last minute), it’s healthy. - Workers: make sure at least one worker shows a recent “Last heartbeat”. - Docs: Worker CLI, Read work queues API 2) CLI checks - Inspect the pool for a quick snapshot:
Copy code
prefect work-pool inspect "<your-pool>"
- List queues and see their status:
Copy code
prefect work-queue ls
- Trigger an artificial poll of a specific queue (useful for testing visibility/reachability):
Copy code
prefect work-queue read-runs "<your-queue>" -p "<your-pool>"
(help: Read work queues API) 3) Worker logs - Start (or check) your worker and watch its logs. You should see messages like “Polling work pool … / work queue …” and periodic “No scheduled flow runs found” when idle.
Copy code
prefect worker start -p "<your-pool>" -q "<your-queue>"
- Increase verbosity to see polling intervals:
Copy code
PREFECT_LOGGING_LEVEL=DEBUG prefect worker start -p "<your-pool>" -q "<your-queue>"
- CLI ref: Worker CLI 4) Optional health check - If you’ve enabled the worker health check server, an HTTP GET to the health endpoint will return 200 OK when the worker loop is healthy. See: Worker health checks If you share your pool/queue names and how you’re running the worker (local process, Docker, K8s), I can suggest the quickest check for your setup.
a
@Marvin i go to the workers tab in my workpool. There are 2 that are online but i cant check the work queues they are polling. how do i check?
m
thought for 130.0 seconds
Short answer: the UI doesn’t currently show “which queues each worker is polling.” You can still confirm it a few ways: What a worker polls - If you started a worker with one or more
-q/--work-queue
flags, it polls only those queues. - If you did not pass
-q
, the worker polls all queues in that work pool. Ways to check right now - Worker startup logs: On boot, the worker logs the pool and the queues it will poll. Check the logs of each worker process/container/pod. - UI > Work Pool > Work Queues tab: Look at “Last polled.” Any queue with a recent timestamp is being polled by at least one worker in that pool. - CLI: - List all queues and their status
Copy code
prefect work-queue ls
- Inspect a specific queue for more details (last polled, health, etc.)
Copy code
prefect work-queue inspect "<queue-name>" -p "<pool-name>"
- Trigger an artificial poll (useful to test visibility/reachability)
Copy code
prefect work-queue read-runs "<queue-name>" -p "<pool-name>"
If you need a clear per-worker mapping going forward, start each worker with explicit queues and a distinct name, e.g.:
Copy code
prefect worker start -p "<pool-name>" -q "high" -q "default" --name "worker-a"
Then the logs for “worker-a” will clearly show it polling only those queues. References: - Worker CLI: Worker CLI - Work queue CLI: Work queue CLI - Work pools/queues concepts: Work pools