https://prefect.io logo
Title
m

Max Jackson

04/04/2023, 6:54 PM
Does Prefect 2 have something analogous to
wait_for_flow_run
from Prefect 1? I'd like to have a flow of flows which stops in a Failed state if one of its subflows fails, but I'm not sure how best to implement this in Prefect 2.
1
m

Max Jackson

04/04/2023, 9:00 PM
Thanks for the direction! My flow-of-flows still 'succeeds' even when one of its subflows fails. Right now I'm manually checking my subflow for Failed status and raising an error if I see it, I was just curious if there was a built-in way to do that.
z

Zanie

04/05/2023, 3:00 PM
You can just access the result of the subflow i.e.
state.result()
which will raise an exception if it’s failed
1