From c318cb255afc3a7316cbcd003a090ebe4b592e2b Mon Sep 17 00:00:00 2001 From: Ruben Fiszel Date: Tue, 6 Dec 2022 00:05:02 +0100 Subject: [PATCH] handle more waiting case as base case for special primitives in flows --- backend/windmill-worker/src/worker_flow.rs | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/backend/windmill-worker/src/worker_flow.rs b/backend/windmill-worker/src/worker_flow.rs index 0de1543bf5..b6fef1a9f3 100644 --- a/backend/windmill-worker/src/worker_flow.rs +++ b/backend/windmill-worker/src/worker_flow.rs @@ -1475,7 +1475,9 @@ async fn compute_next_flow_transform<'c>( let new_args: &mut Map = &mut Map::new(); let next_loop_status = match status_module { - FlowStatusModule::WaitingForPriorSteps { .. } => { + FlowStatusModule::WaitingForPriorSteps { .. } + | FlowStatusModule::WaitingForEvents { .. } + | FlowStatusModule::WaitingForExecutor { .. } => { let (token, by_id) = if let Some(x) = transform_context { x } else { @@ -1594,7 +1596,9 @@ async fn compute_next_flow_transform<'c>( } FlowModuleValue::BranchOne { branches, default, .. } => { let branch = match status_module { - FlowStatusModule::WaitingForPriorSteps { .. } => { + FlowStatusModule::WaitingForPriorSteps { .. } + | FlowStatusModule::WaitingForEvents { .. } + | FlowStatusModule::WaitingForExecutor { .. } => { let mut branch_chosen = BranchChosen::Default; let (token, idcontext) = get_transform_context(db, &flow_job, previous_id, &status).await?; @@ -1658,7 +1662,9 @@ async fn compute_next_flow_transform<'c>( } FlowModuleValue::BranchAll { branches, parallel, .. } => { let (status, flow_jobs) = match status_module { - FlowStatusModule::WaitingForPriorSteps { .. } => { + FlowStatusModule::WaitingForPriorSteps { .. } + | FlowStatusModule::WaitingForEvents { .. } + | FlowStatusModule::WaitingForExecutor { .. } => { if branches.is_empty() { return Ok((tx, NextFlowTransform::EmptyInnerFlows)); } else if *parallel {