https://prefect.io logo
Title
м

Михаил Бараковский

02/09/2022, 8:02 AM
Hi! How to make an alert when a process gets "cancelling" status?
k

Kevin Kho

02/09/2022, 8:02 AM
You can find this in the Automations docs. Only available on Cloud
м

Михаил Бараковский

02/09/2022, 8:07 AM
Is it possible to intercept this status using a state handler?
k

Kevin Kho

02/09/2022, 8:15 AM
No because cancellation doesnt trigger state handlers. Someone said
def myhandler(...):
    if isinstance(new_state, Cancelled):
        ....
worked but I personally doubt it. You can try though
a

Anna Geller

02/09/2022, 11:00 PM
a bit late with this answer but this topic dives deeper into that https://discourse.prefect.io/t/is-it-possible-to-take-action-on-flow-run-cancellation/141
🙌 1