diff --git a/backend/.sqlx/query-d323e898931b200eeec8c5608c37043ed1c47b6f6a53dbf562ad09ece29e82e4.json b/backend/.sqlx/query-38846b12201990f8e776b256ac419b24ffec46fa02d710544a3074745be9455f.json similarity index 64% rename from backend/.sqlx/query-d323e898931b200eeec8c5608c37043ed1c47b6f6a53dbf562ad09ece29e82e4.json rename to backend/.sqlx/query-38846b12201990f8e776b256ac419b24ffec46fa02d710544a3074745be9455f.json index 6c90b7e623..f94429e4f9 100644 --- a/backend/.sqlx/query-d323e898931b200eeec8c5608c37043ed1c47b6f6a53dbf562ad09ece29e82e4.json +++ b/backend/.sqlx/query-38846b12201990f8e776b256ac419b24ffec46fa02d710544a3074745be9455f.json @@ -1,6 +1,6 @@ { "db_name": "PostgreSQL", - "query": "UPDATE queue SET suspend = 0 WHERE parent_job = $1 AND suspend = $2", + "query": "UPDATE queue SET suspend = 0 WHERE parent_job = $1 AND suspend = $2 AND (flow_status->'step')::int = 0", "describe": { "columns": [], "parameters": { @@ -11,5 +11,5 @@ }, "nullable": [] }, - "hash": "d323e898931b200eeec8c5608c37043ed1c47b6f6a53dbf562ad09ece29e82e4" + "hash": "38846b12201990f8e776b256ac419b24ffec46fa02d710544a3074745be9455f" } diff --git a/backend/windmill-worker/src/worker_flow.rs b/backend/windmill-worker/src/worker_flow.rs index 2bed31c9e8..2ec56c07a7 100644 --- a/backend/windmill-worker/src/worker_flow.rs +++ b/backend/windmill-worker/src/worker_flow.rs @@ -434,7 +434,7 @@ pub async fn update_flow_status_after_job_completion_internal< if parallelism.is_some() { sqlx::query!( - "UPDATE queue SET suspend = 0 WHERE parent_job = $1 AND suspend = $2", + "UPDATE queue SET suspend = 0 WHERE parent_job = $1 AND suspend = $2 AND (flow_status->'step')::int = 0", flow, nindex )