HI everyone,
I was wondering about slack notifications (or any other type of notification), when i set up a number of retries > 0, is there a way to only trigger the notification if the task fails after all the retries.
k
Kevin Kho
04/22/2022, 5:32 PM
Yes, so if you are using a state_handler, you can fetch
prefect.context.task_run_count
and then compare to the
task.max_retries
and then just send an alert if the condition is met.