https://prefect.io logo
Title
n

Nicolas van de Walle

07/08/2020, 10:13 AM
Hi all, I was wondering how to make the parent flow wait for the FlowRunTask child flow output. What I mean here is that I don't want the FlowRunTask to only trigger the second flow but I want to be able to wait for it to end and use its output in the parent flow. Thanks in advance!
j

josh

07/08/2020, 11:29 AM
Hi @Nicolas van de Walle for this I would suggest using something like:
from prefect import Client
c = Client()
info = c.get_flow_run_info(id_from_created_flow_run)

state = info.state
# ^ do something with this prefect State object
# if not what you want, sleep for a bit and query again
n

Nicolas van de Walle

07/08/2020, 11:31 AM
Thanks for your answer! So there is no blocking version of FlowRunTask?
j

josh

07/08/2020, 11:33 AM
Not at the moment but we always welcome contributions to the task library 🙂
👍 1
c

Chris White

07/08/2020, 4:46 PM
Hi @Nicolas van de Walle - great timing! I just submitted a PR for this exact feature here: https://github.com/PrefectHQ/prefect/pull/2935/files
🚀 2