fix suspend + sleep with same worker

This commit is contained in:
Ruben Fiszel
2022-10-12 15:56:15 +02:00
parent 9188e38fa7
commit eb6d0084ab
2 changed files with 2 additions and 3 deletions
+1 -2
View File
@@ -1399,9 +1399,8 @@ pub async fn push<'c>(
}
};
let mut is_running = same_worker;
let is_running = same_worker;
if let Some(flow) = raw_flow.as_ref() {
is_running = false;
same_worker = same_worker || flow.same_worker;
if flow.modules.len() == 0 {
Err(Error::BadRequest(format!(
+1 -1
View File
@@ -925,7 +925,7 @@ async fn push_next_flow_job(
};
let continue_on_same_worker =
flow.same_worker && !matches!(job_payload, JobPayload::RawFlow { .. });
flow.same_worker && module.suspend.is_none() && module.sleep.is_none();
/* Finally, push the job into the queue */
let tx = db.begin().await?;