Hello, is there a way to limit the concurrent run ...
# prefect-server
i
Hello, is there a way to limit the concurrent run of flows? Assume that I have a flow that can be run from different resources and we do not want concurrent runs of some flows. We need to put a kind of queue to control triggers on our side but is there a way to limit concurrent runs of a specific flow on the Prefect side? I saw an ability to limit concurrent runs of tasks but I need for a specific flow.
k
Hi @Ismail Cenik! I will double-check but I think this is a cloud only feature. Are you on server?
z
There's some WIP documentation at https://deploy-preview-4492--prefect-docs.netlify.app/orchestration/flow-runs/concurrency-limits.html#flow-run-limits -- as Kevin said, this is Cloud only though.
i
Thanks for the quick answer. We are on the cloud and our agent is running on our EKS. As far as I understand, when I give a label to a specific flow, I can limit the concurrency run of that flow to 1? The other flows and runs will not be affected by that config change, right?
k
You mean changing flow concurrency while there are flows running? The flows will be allowed to finish fist
πŸ‘ 1
z
Yep @Ismail Cenik that is correct
πŸ‘ 1
i
Thank you.
Hello, I define the label as "
Copy code
run_config=KubernetesRun(job_template_path="job_template.yaml", labels=["NonConcurrent-Run"])
" This is our Flow Concurrency
This is the warning message
k
And do you have an agent with the label?
i
Our Agent is running on Kubernetes so we need to define the same label on Kubernates Agent, right?
k
Yes exactly
πŸ‘ 1
i
Is there any link for describing that definition? So I will forward it to the related party. I do not have access to it everywhere in our system.
k
I think this if they are starting with the CLI
Actually that covers all ways
t
Hi @Kevin Kho , I am from the same organization as Ismail and am pondering, the documentation that you sent in the thread (this) , is to start a whole new prefect-agent, we already have a prefect-agent up and running, we need to have a label for that right? As long as the one that's in the yellow state, runs on my local it's fine, once my shell terminated it goes into yellow and then red, is there a way we can change the label for the agent that's on the right side? which is the one we're using currently. @Ismail Cenik
k
You need to restart the agent with the new labels.
There is no way to add labels on the agent once it’s started