Anders Segerberg
01/05/2023, 5:46 PMwait_for_flow_run several times.
I want this parent flow's success to depend on the success of all child flows.
I've tried setting upstream_tasks to the result of wait_for_flow_run , but I realize that that's a FlowRunView object, not a Task.
From the child flow, I can get_tasks, and set upstream_tasks to that. But I have some tasks I allow to fail in the child flows (they are not reference tasks of the child flow.)
What I'd really like to do is to be able to reference <child_flow>.state , and set the parent flow's reference tasks to be expecting a
<Success: "All reference tasks succeeded.">
Is there a built-in way of going about this, instead of just manually inspecting the child flow results, and raising the appropriate SIGNAL ?Kalise Richmond
01/05/2023, 8:58 PMraise_final_state in the wait_for_flow_run to accomplish this. https://docs-v1.prefect.io/api/latest/tasks/prefect.html#wait-for-flow-run
Here's a great example.Anders Segerberg
01/05/2023, 11:07 PM