Vladimir Bolshakov
04/01/2021, 1:17 PMResume
state passed via Client.set_task_run_state
method to paused task in task runtime? When i try to use Client.get_task_run_state
in task i found that state in task runtime is Running
(after Resume
and after Submitted
). So passed result to Resume
state is not accessible. Have any ideas?Zanie
Vladimir Bolshakov
04/01/2021, 3:27 PMtask_run_id
). After some time, when consumer receive a reply message, it call set_task_run_state
with state Resume
and message reply result in it. After that task is resumed and at first step i try to get result from state via get_task_run_state
. I expect state Resume
, but actually i get Running
Vladimir Bolshakov
04/01/2021, 3:30 PMZanie
Running
state 🙂 I'm not sure the Prefect API is the best place to be passing messages, but you can write a GraphQL query that pulls the most recent resume state for your task instead of the current stateVladimir Bolshakov
04/01/2021, 3:34 PMVladimir Bolshakov
04/01/2021, 3:37 PMZanie
Zanie
query {
task_run(where: {task_id: {_eq: "5d74935d-356b-4e3a-ab61-362f379699e4"}, state: {_eq: "Resume"}}, limit: 1, order_by: {created: desc}) {
serialized_state
}
}
would be roughly what you're looking forVladimir Bolshakov
04/01/2021, 3:41 PMZanie
query { task_run { ... } }
to start taking a look at the dataZanie
Zanie