Hello everyone, I am having trouble setting a wor...
# ask-community
s
Hello everyone, I am having trouble setting a work pool concurrency limit to 0 using Prefect's cli (but this works through the UI) Observed behavior: When I run:
Copy code
prefect work-pool update --concurrency-limit 0 work-pool-1
I get the following output on my terminal:
Copy code
Updated work pool 'work-pool-1'
However, when I go check the concurrency limit on Prefect Cloud, I see that the concurrency limit is still set at its previous value. When I make a flow run, it is polled by the agent, confirming this is not a UI issue. When I execute the same command but with another concurrency limit (say 1), I get the same output on my terminal, but the concurrency limit is correctly modified to 1 on Prefect Cloud. When I manually set the concurrency limit of my work pool to 1 using Prefect Cloud's UI, the operation is correctly registered. When I make a flow run, no agent polls it and it stays "Late" indefinitely (this is the behavior I was expecting). I wanted to report a bug, but wanted to know if I was missing something before doing it. Thanks for your help !
1
k
I'm not sure if 0 is a valid value for a concurrency limit. What goal is a limit of 0 intended to accomplish?
s
hello Kevin, thank you for your answer. The goal here is to avoid all agents to poll from the work pool during a short period of time (for example, during a new deployment)
k
maybe an easier way to accomplish that would be to flip the switch on the work pool to pause it?
s
that looks like a better way of doing this, thank you ! So, using the cli it should be:
Copy code
prefect work-pool pause work-pool-1
?
k
yep, and its counterpart,
prefect work-pool resume work-pool-1
👍 1
s
I tested and it does exactly what I was expecting. Thank you !
🙌 2