Hi folks, do flow concurrency limits take the flow...
# ask-community
m
Hi folks, do flow concurrency limits take the flow run parameters into account ? i.e. if I don’t want two flow runs with the same parameters to run at the same time - how do I go about achieving this ?
One workaround is to register each variation of parameters as a separate flow and enforce a concurrency limit of 1 on each flow in case parameters aren’t taken into account - but that results in a bit of a proliferation of flows…
👍 2
k
Hey @Marwan Sarieddine, flow run concurrency is based on labels, so it wouldn’t take parameters to account. You would probably need a starting task to use the GraphQL API and query for the flow runs and the parameters, then compare them with your parameters, and then raise the
ENDRUN
signal based on that. Quite a mess I think. What is the use case here causing the duplicate parameter sets?
m
Hi @Kevin Kho thanks for confirming this. Will try to think more about the graphql solution but it does sound somewhat cumbersome … The use case is I have an upstream flow that triggers downstream flow runs (which are the same flow but with variations of different parameter values) which are somewhat long running and mutate different tables using update operations… If I want to increase the schedule frequency on this upstream flow, I risk that the triggered downstream flows start overlapping - I suppose one workaround is to make the upstream flow wait on the triggered flows to complete - just sounds like a bit of a waste of compute … Which is why splitting each parameter variation into a separately registered flow and forcing a limit of 1 seems more reasonable to me …
k
I see, I think the operation to check if there is a flow with the same parameter set running is easier to do on the upstream flow level, but still a bit cumbersome