Ovo Ojameruaye
02/28/2022, 6:40 AMAnna Geller
02/28/2022, 10:33 AMwait_for_flow_run
task that you need to set to raise Failure in the parent flow upon a failure in a child flow: raise_final_state=True
Here is an example in a flow:
from prefect import Flow
from prefect.tasks.prefect import create_flow_run, wait_for_flow_run
with Flow("parent_flow") as flow:
child_flow_run_id = create_flow_run(
flow_name="child_flow_name", run_name="custom_run_name"
)
child_flowrunview = wait_for_flow_run(
child_flow_run_id, raise_final_state=True, stream_logs=True
)
Ovo Ojameruaye
03/01/2022, 6:25 AMAnna Geller
03/01/2022, 10:37 AM