Hi, is there a way to stop all running flows? If I...
# prefect-community
r
Hi, is there a way to stop all running flows? If I have a bunch of running flows that are hung, how can I stop them quickly?
j
Hi Richard, the latest release of prefect (0.13.0) supports cancellation of running flows, but the UI doesn't have a nice button for this yet (should be released in the next week or so hopefully). For now, calling the
cancel_flow_run
graphql route will trigger a cancellation (again, for 0.13.0 only).
j
Hi Richard. We just added a
cancel_flow_run
mutation which can stop your flow runs. It works best with prefect 0.13.0 or higher.
r
I will upgrade to this version, thanks
👍 1
@Jenny @Jim Crist-Harif do you have an example how to use this
cancel_flow_run
mutation?
j
Sure - do you have access to the Interactive API in the UI? (Server or Cloud).
Copy code
mutation {
  cancel_flow_run(input: {flow_run_id: "00000"}) {
    state
  }
}
Your flow run id would go where 000000 is.