I have a scenario where have a flow that queries ~...
# prefect-cloud
l
I have a scenario where have a flow that queries ~ 300 apis as separate tasks. Because 1 or 2 of these tasks fail randomly and intermittently on most flow runs we have found our alerting very noisy and want to resolve this. Our solution we want is that we want to only send an alert to slack if THE SAME task fails on consecutive flow runs. Is there any way to introspect the prefect cloud state programatically (CLI or python client) to work out which tasks failed for a given flow run?
s
Hi Louis, I feel like there is a way that you could use state change task run hooks, using the
on_failure
hook on the task of interest to track some counter/threshold 🤔 I’m afk at the moment, but probably others could recommend a way to do it the way you mentioned.