Question about setting states in flows and tasks - specifically setting a flow to
Cancelling
state, and tasks still running after flow has entered
Cancelled
state - see thread
scott
05/08/2023, 4:36 PM
We’re manually cancelling flows in some cases before starting another run of the same flow, using
Copy code
async with get_client() as client:
await client.set_flow_run_state(flow_run_id=run.id, state=Cancelling(), force=True)
scott
05/08/2023, 4:38 PM
That works to cancel a flow, but the tasks within that cancelled flow continue to run. I assumed the tasks would be cancelled if the flow run is cancelled, but apparently the Prefect Cloud UI Cancel button is doing something different?
scott
05/08/2023, 4:38 PM
I guess I need to cancel the tasks and the flow, not just the flow.
Bring your towel and join one of the fastest growing data communities. Welcome to our second-generation open source orchestration platform, a completely rethought approach to dataflow automation.