Hi - I'm working on a flow wherein I have a task t...
# prefect-community
m
Hi - I'm working on a flow wherein I have a task that I only want to run when a particular upstream task fails. I've read through the docs and I am trying to use triggers to do this. There are a lot of flavors of triggers: all_finished, all_successful, all_failed, any_successful, any_failed, some_failed, etc. However, it's not clear to me if there is a way to specify if one particular upstream task failed to trigger the downstream task. I don't want to use some_failed or any_failed because there is a good chance that the failure happened at a task elsewhere in the flow
c
Hi @Mark McDonald! If you have a task, B, that you only want to run when task A fails, would it be possible to make A the only upstream dependency of B? If so, you could use
any_failed
and because A is the only upstream dependency this would only run if / when A fails
m
hmm - maybe. I can find some work around. But as a suggestion for a future enhancement it would be great if it were possible to specify the upstream dependency tasks in a failure trigger
thanks @Chris White
👍 1