https://prefect.io logo
Title
j

justabill

05/04/2023, 8:12 PM
We're so excited to share Prefect 2.10.7 🚀 :its-beautiful: This release combines the previously separate flows and deployments UI pages into a single, holistic page that brings together information on flows and deployments, as well as their recent and upcoming runs. You can now see the state of the most recent flow run for each flow and deployment, giving you a snapshot of the status of your workspace. In addition, you can now filter deployments by whether their schedule is active and the work pool to which flow runs are submitted. :crash: This release also introduces the new
on_crashed
hook for flows, allowing you to add client-side hooks that will be called when your flow crashes. This is useful for cases where you want to execute code without involving the Prefect API, and for custom handling on
CRASHED
terminal states. This callable hook will receive three arguments:
flow
,
flow_run
, and
state
.
from prefect import flow

def crash_hook(flow, flow_run, state):
    print("Don't Panic! But the flow has crashed...")

@flow(on_crashed=[crash_hook])
def my_flow():
    # call `crash_hook` if this flow enters a `CRASHED` state
    pass
Check out the release notes for more information.
:prefect: 7
6
🚀 19
❤️ 5
🔥 6
🎉 11
😢 5