We are using Prefect cloud and We want to enable t...
# prefect-community
s
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
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:
Copy code
def myhandler(task, old_state, new_state):
    if new_state.is_running():
        # put python logic to check lateness here
        if late:
             send_some_notification