https://prefect.io logo
#prefect-community
Title
# prefect-community
r

Richard Hughes

08/11/2020, 2:55 PM
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

Jim Crist-Harif

08/11/2020, 3:01 PM
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

Jenny

08/11/2020, 3:01 PM
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

Richard Hughes

08/11/2020, 3:22 PM
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

Jenny

08/11/2020, 5:28 PM
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.