https://prefect.io logo
Title
v

Vrinda Kailash

07/14/2022, 3:10 PM
hi all We are using an Automation for a DAG to create a new flow-run after a flow-run has “Finished”, We are facing an issue where multiple flow-runs are created at the same time
1
@Anna Geller
a

Anna Geller

07/14/2022, 6:22 PM
your img
please keep things in 1 thread next time
I currently don't have enough information to say what's the root cause can you explain what problem are you trying to solve? What have you done so far - can you describe all the steps you have taken? can you share your flow code and explain your setup?
v

Vrinda Kailash

07/14/2022, 6:40 PM
we have created an Automation in Prefect Cloud from here:
the Automation definition is: “When any run from <dag> changes state to selected states then start a new run”
selected states:
a

Anna Geller

07/14/2022, 8:03 PM
is it the same flow? in that case, you would sort of have a never-ending loop of runs, is that intended? can you explain what problem are you trying to solve?
v

Vrinda Kailash

07/14/2022, 8:09 PM
yes that is correct we need the flow to run continuously to identify any new data as soon as it appears in our source
a

Anna Geller

07/14/2022, 10:35 PM
That's basically a streaming use case and for that, we will soon have a recipe for 2.0 For 1.0 check out this state handler solution instead of Automation: https://gist.github.com/anna-geller/0dca1181d56e797f38390ad8850c54d7
v

Vrinda Kailash

07/15/2022, 7:50 PM
hi Anna This is quite useful Any idea why the flow name keeps appending for each run?
a

Anna Geller

07/15/2022, 7:55 PM
No, can you share your flow code?
v

Vrinda Kailash

07/15/2022, 7:57 PM
@Amogh Kulkarni 👆