ale
10/09/2020, 9:12 AMRaphaël Riel
10/09/2020, 12:30 PMale
10/09/2020, 12:39 PMRaphaël Riel
10/09/2020, 12:42 PMprefect.engine.signals.SKIP
nicholas
Raphaël Riel
10/09/2020, 12:46 PMale
10/09/2020, 12:47 PMnicholas
ale
10/09/2020, 1:10 PMnicholas
from prefect import Client
@task
def check_runs():
c = Client()
query = """
query RunningFlows {
flow_run(where: { state: { _eq: "Running" } }) {
id
}
}
"""
c.graphql(query=query)
Submitted
and Running
, and probably filter out the current flow run using the flow_run_id
embedded in the context
.ale
10/09/2020, 1:23 PMnicholas
mutation CancelFlowRun($flowRunId: UUID!) {
cancel_flow_run(input: { flow_run_id: $flowRunId }) {
state
}
}
which you can supply a flow_run_id
(you don't need to use the variables as I have here)S K
02/23/2021, 4:50 PMale
02/23/2021, 4:56 PMcancel_flow_run
method as far as I know!S K
02/23/2021, 6:50 PMnicholas