Nathaniel Russell

11/15/2022, 8:04 PM
If I have a flow running that grabs all other flow runs with read_flow_runs, and it picks out the flow run that it is supposed to follow. How do I make it wait until the other flow is done before continuing? Can I do this without a busy wait?
If this isn't clear:

flow run A is running
flow run A has list of info on flow runs B -> G
flow run A picks out flow run D
I want flow run A to wait until flow run D is done before continuing, how do I do this step?

Mason Menges

11/15/2022, 9:47 PM
Hmm off the top of my head here as long as you have the ID for the flow run, assuming this is for prefect 2, you can through the read_flow_run call in a while loop with and have it check every 5-10 seconds or so the state of the flow run you're watching