If I have a flow running that grabs all other flow...
# prefect-community
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?
Copy code
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?
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 https://docs.prefect.io/api-ref/prefect/client/#prefect.client.orion.OrionClient.read_flow_run