How to take action on a state change of a task run? (task-level state handler)

Also, I think this needs to be updated with submit


@task
def fail_successfully(x):
    return 1 / x

@flow
def main_flow(nr: int):
    future_obj = fail_successfully.submit(nr)
    send_slack_alert_on_failure(future_obj)
1 Like