We are using Prefect cloud and We want to enable task level SLA. Whenever the task in the flow is delayed, We want to get notification. is that possible?
k
Kevin Kho
06/22/2022, 1:14 PM
Tasks don’t have a concept of delated so it would have to be on the Flow level. Do you need a task to run at a specific time? This can be done with a state handler maybe. Do something like:
def myhandler(task, old_state, new_state):
if new_state.is_running():
# put python logic to check lateness here
if late:
send_some_notification