Igor Bondartsov
07/22/2021, 2:34 PMKevin Kho
Igor Bondartsov
07/22/2021, 4:12 PMKevin Kho
Kevin Kho
trigger=any_failed
should go inside the @task(trigger=any_failed)
. And then you should change error_handler(upstream_tasks=[parent_task])
to error_handler(upstream_tasks=[parent])
so that it depends on the result of parent
. After that, the flow triggers will work as expected.
You are right that this flow will always be a Failure. You can fix this by following the example here and setting success
as the reference task so that the Flow success/failure depends on that task and not the error
task.
You can also put the logic of the failed task inside a state_handler
and attach it to the task that can fail. Docs on that here