Khuyen Tran
10/31/2022, 3:11 PMfrom prefect import flow, task
from prefect.blocks.notifications import SlackWebhook
from prefect_alert import alert_on_failure
@task
def may_fail():
raise ValueError()
@alert_on_failure(block_type=SlackWebhook, block_name="test")
@flow
def failed_flow():
res = may_fail()
return res
if __name__=="__main__":
failed_flow()
Thanks @Ryan Peden for contributing the collection!