Hello everyone, I am looking for a way to make my flow dependent on another one. In Airflow I used externalTaskSensor: in DAG "B" check DAG "A" status, if it's not a success then retry later.
I've tried StartFlowRun, but it starts a new run of DAG "A" every time. I have some heavy computation in "A" and don't want it to be run multiple times.
Is there a way to do it without kicking off parent flow?
👀 1
k
Kevin Kho
09/02/2021, 1:57 PM
Hey @Anton Chekmarev, we don’t have sensors in Prefect. We use event driven flows instead. So if there is an upstream flow or event, you can use
Client.create_flow_run
or hit the API when that event happens to trigger a flow run.
Some people add a loop inside their task to check for the completion of the upstream task.