https://prefect.io logo
Title
k

Kevin Otte

03/15/2022, 4:03 AM
question: Let's say I have 2 separate repos where prefect lives...can I post a 'wait for done" flag type object (similar to airflow) that sends a signal to the 2nd Flow that it can be started?
k

Kevin Kho

03/15/2022, 4:05 AM
Hi @Kevin Otte, a couple of things. You can code this with the native requests library like this. You can use
Client.create_flow_run
and lastly you can use the
create_flow_run
built-in task by invoking it with
create_flow_run.run(…)
So the first Flow would trigger the second Flow in this model
a

Anna Geller

03/15/2022, 9:47 AM
And regarding your "wait for done aspect", Prefect also has a task allowing you to poll the child flow run for status and block until its (successful) completion called
wait_for_flow_run
. Check out this Discourse topic if you need an example https://discourse.prefect.io/t/how-can-i-create-a-subflow-and-block-until-it-s-completed/94