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:
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
Kevin Grismore
11/27/2023, 3:25 PM
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
Sofia Calcagno
11/27/2023, 3:43 PM
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
Kevin Grismore
11/27/2023, 3:46 PM
maybe an easier way to accomplish that would be to flip the switch on the work pool to pause it?
s
Sofia Calcagno
11/27/2023, 3:48 PM
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
Kevin Grismore
11/27/2023, 3:51 PM
yep, and its counterpart,
prefect work-pool resume work-pool-1
👍 1
s
Sofia Calcagno
11/27/2023, 3:56 PM
I tested and it does exactly what I was expecting. Thank you !
Bring your towel and join one of the fastest growing data communities. Welcome to our second-generation open source orchestration platform, a completely rethought approach to dataflow automation.