I'm using Prefect 2 and trying to cancel a flow ru...
# ask-community
l
I'm using Prefect 2 and trying to cancel a flow run from within a non-async task under certain conditions. I can return a Cancelled state from the task, but the flow continues executing the rest of the tasks before completing with a Cancelled state itself. I want the flow to cease execution immediately with a Cancelled state.
z
You’d need to access the result of the task from the flow