This commit is contained in:
Ruben Fiszel
2024-08-14 14:34:58 +02:00
parent acfe6325a1
commit ecea507670
3 changed files with 11 additions and 0 deletions
+6
View File
@@ -213,6 +213,12 @@ pub struct Suspend {
pub self_approval_disabled: Option<bool>,
#[serde(skip_serializing_if = "Option::is_none")]
pub hide_cancel: Option<bool>,
#[serde(skip_serializing_if = "false_or_empty")]
pub continue_on_disapprove_timeout: Option<bool>,
}
fn false_or_empty(v: &Option<bool>) -> bool {
v.is_none() || v.as_ref().is_some_and(|x| !x)
}
#[derive(Deserialize, Serialize, Debug, Clone)]
@@ -760,6 +760,7 @@ pub async fn update_flow_status_after_job_completion_internal<
// tracing::error!(
// "UPDATE FLOW STATUS 3: {module:#?} {unrecoverable} {} {is_last_step} {success} {skip_error_handler}", flow_job.canceled
// );
let should_continue_flow = match success {
_ if stop_early => false,
_ if flow_job.canceled => false,
@@ -1749,6 +1750,8 @@ async fn push_next_flow_job<R: rsmq_async::RsmqConnection + Send + Sync + Clone>
tx.commit().await?;
/* not enough messages to do this job, "park"/suspend until there are */
} else if suspend.continue_on_disapprove_timeout.unwrap_or(false) {
todo!()
} else if matches!(
&status_module,
FlowStatusModule::WaitingForPriorSteps { .. }
+2
View File
@@ -139,6 +139,8 @@ components:
type: boolean
hide_cancel:
type: boolean
continue_on_disapprove_timeout:
type: boolean
priority:
type: number
continue_on_error: