update current job to in progress

This commit is contained in:
Ruben Fiszel
2022-07-31 22:41:41 +02:00
parent c37b9f7106
commit d397e6d618
+2 -3
View File
@@ -277,11 +277,10 @@ pub async fn update_flow_status_in_progress(
let step = get_step_of_flow_status(db, flow).await?;
sqlx::query(&format!(
"UPDATE queue
SET flow_status = jsonb_set(flow_status, '{{modules, {}, job}}', $1)
SET flow_status = jsonb_set(flow_status, '{{modules, {step}, job}}', $1)
WHERE id = $2 AND workspace_id = $3",
step
))
.bind(job_in_progress)
.bind(job_in_progress.to_string())
.bind(flow)
.bind(w_id)
.execute(db)