fix: fix wrong interaction between suspended steps and forloop parallelism

This commit is contained in:
Ruben Fiszel
2024-07-04 14:53:43 +02:00
parent 2812792326
commit 0ada83a80a
2 changed files with 3 additions and 3 deletions
@@ -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"
}
+1 -1
View File
@@ -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
)