Mark McDonald
04/21/2021, 5:18 PMnicholas
Mark McDonald
04/21/2021, 5:27 PMnicholas
Mark McDonald
04/21/2021, 5:29 PMMark McDonald
04/21/2021, 5:45 PMnicholas
Mark McDonald
04/21/2021, 9:38 PM{
flow_run(where: {flow_id: {_eq: flow_id}}, limit: 1, order_by: {created: asc}) {
id
}
}
2. I'd then check the flow_run_state for the most recent flow run and make sure that status is success, failed, or cancelled
{
flow_run_state(where: {flow_run_id: {_eq: flow_run_id}} limit: 1, order_by: {timestamp: desc}) {
state, timestamp
}
}
Does this make sense to you? Is there a better way of querying the graphql api to see if there are any active runs for flow, regardless of flow version?nicholas
query {
flow_run(
where:
{
flow_id: { _eq: <<flow_id from context>> }, flow_run_id: { _neq: <<flow_run_id from context>> },
state: { _in: ["Running", "Submitted"] } } )
{
id
state
}
}
nicholas
nicholas
Mark McDonald
04/21/2021, 10:01 PMMark McDonald
04/21/2021, 10:54 PMnicholas