Nicolas van de Walle
07/02/2020, 10:07 AMJeremiah
07/02/2020, 11:44 AMNicolas van de Walle
07/02/2020, 11:51 AMJeremiah
07/02/2020, 12:20 PMc = prefect.Client()
c.set_task_run_state(
<YOUR TASK RUN ID>,
version=2,
state=prefect.engine.state.Resume()
)
c.graphql(
"""
query {
task_run(where: {id: {_eq: <TASK_RUN_ID>}}) {
state
version
}
}
"""
)
Nicolas van de Walle
07/02/2020, 12:48 PMc = prefect.Client()
c.set_task_run_state(
<YOUR TASK RUN ID>,
version=2,
state=prefect.engine.state.Resume()
)
I looked at the setTaskRunState mutation which is deprecated so I tried set_task_run_state*s* but I could not understand how this one works. Here is what I've got so far:
mutation {
set_task_run_states(input: {
states: {
task_run_id: "TASK_RUN_ID"
version: 2
state: "{\"type\":\"Success\"}"
}
}) {
states {
id
status
message
}
}
}
This works well, it changes the task state but does not go further. The flow does not continue after this change (and does not end either if it was the last task). @Jeremiah do you have an idea of what I might be doing wrong? Thank you!Jeremiah
07/10/2020, 2:57 PMmutation {
set_task_run_states(input: {
states: [ # <- note this bracket
{
task_run_id: "TASK_RUN_ID"
version: 2
state: "{\"type\":\"Success\"}"
}
] # <- note this bracket
}) {
states {
id
status
message
}
}
}
Nicolas van de Walle
07/13/2020, 11:24 AM