Chandra Manginipalli
09/14/2020, 8:10 PMnicholas
09/14/2020, 8:44 PMKyle Moon-Wright
09/14/2020, 8:46 PMcreate_flow_run
, set_flow_run_states
, and/or the cancel_flow_run
mutations that are available.Chandra Manginipalli
09/14/2020, 8:49 PMwith Flow("for loop Flow") as forflow:
for batch in batches:
process_batch(batch)
Kyle Moon-Wright
09/14/2020, 9:03 PMprocess_batch
task for each batch rather than creating a new process_batch
task for each batch. So my vote is to break up the batches, then map the process_batch
onto each batch dynamically (which can still iterate in sequence with the default Executor rather than parallelized).Chandra Manginipalli
09/15/2020, 9:08 PMnicholas
09/15/2020, 10:29 PMPaused
state, you only need to set the state of any Paused
task runs. This gives more flexibility (and multiple manual checkpoints, if so desired). You can resume a run by setting any task run in the Paused
state to a Resume
state, with the following mutation:
mutation Approve {
set_task_run_states(input: { states: [ { task_run_id: "PAUSED_TASK_RUN_ID", state: { type: "Resume", message: "Some message you want to set that will appear in logs to let you know why/who resume this" } } ] }) {
states { id }
}
}
Chandra Manginipalli
09/16/2020, 1:32 PMmutation {
set_flow_run_states(input: {states : [{flow_run_id: "c02fe104-c7aa-4823-9134-11988926c0b1", version: 6, state: "{\"type\": \"Paused\"}"
}]}) {
states {
id
}
}
}
Code used to Schedule flow run back to running.
mutation {
set_flow_run_states(input: {states : [{flow_run_id: "c02fe104-c7aa-4823-9134-11988926c0b1", version: 6, state: "{\"type\": \"Scheduled\"}"
}]}) {
states {
id
}
}
}
nicholas
09/16/2020, 5:03 PM