<@U01HV134CKG> I hope you don't mind that I move y...
# prefect-community
a
@Tim Enders I hope you don't mind that I move your message here - the other channel is for sharing tutorials I have this snippet from Prefect 1.0. What are the analogs to
results
and
state_handler
in 2.0?
Copy code
with Flow(
    "Subscriptions API Import",
    result=GCSResult(bucket="platformsh-vendor-prefect"),
    # executor=LocalExecutor(),
    executor=LocalDaskExecutor(scheduler="threads", num_workers=5),
    state_handlers=[flow_failure],
1
t
Thank you, I didn't realize I was in the other channel. facepalm
🙌 1
a
results are currently handled behind the scenes in 2.0 - you can influence that only by changing the storage location in settings
we are working on that - high priority item to tackle
state handlers are no longer needed, check this for more info https://discourse.prefect.io/t/how-to-take-action-on-a-state-change-of-a-task-run-task-level-state-handler/82 also this upgrade.prefect.io has some good references
t
OK, My state handler is to automatically alert on failure. How would you recommend doing that in 2.0? I am looking for flow-level state options.
a
Notifications blocks
t
sweet, thank you!
l
Does this mean a flow-level state handling would just checking the state of all tasks? The examples provided contained a flow with just 1 task
a
many possibilities on how you could approach it @Leon Kozlowski, we are definitely open to suggestions here I was trying to pitch to the product team the idea of having a default flow-run notification that would provide a summary of all task runs that failed with an exception message for each failed task run, but it was rejected for now -- if this is sth you are looking for you can open a feature request and I'll definitely back you up there 😄
👍 1