https://prefect.io logo
Title
p

Pedro Machado

05/22/2023, 4:45 PM
Hi everyone. I am trying to run a worker with a non-default work queue. I the
prefect worker start
command seems to be ignoring the queue. The worker starts and polls Prefect Cloud, but it seems to be connecting the default queue. I am starting the worker with
prefect worker start --pool local-pool --work-queue ingest-tracker
Has anyone else run into this?
1
a

alex

05/22/2023, 4:49 PM
Hey @Pedro Machado, thanks for raising this! Are you seeing your worker pull scheduled runs from the both the default queue for that pool and your defined queue, or only the default work queue?
p

Pedro Machado

05/22/2023, 5:04 PM
I have two workers. One that was started with
prefect worker start --pool local-pool
And another one that explicitly has
--work-queue ingest-tracker
I see the flows queued in the
ingest-tracker
queue but the worker that picks them up is the one that I started without a
work-queue
. My expectation was that the first worker would pick up from the default queue and the second one from the
ingest-tracker
queue. Is this not how it's designed to work? If I don't specify a queue, will the worker pick up from any queue in that work pool?
It looks like that's the case.
a

alex

05/22/2023, 6:24 PM
Yes, if a worker is started with only a work pool then it will pull scheduled runs from all queues in a work pool. If you want to pull from just he defeault queue then you can run
prefect worker start - local-pool -q default
.
p

Pedro Machado

05/22/2023, 8:30 PM
It seems to be working as expected. It would be great if the worker printed the queue name when starting. Thanks for your help, Alex!
🙌 1