From 104d02dd58c668cffe7c0d31ac6ac2fe8e141d2d Mon Sep 17 00:00:00 2001 From: Malte Sander Date: Thu, 15 Feb 2024 12:49:24 +0100 Subject: [PATCH] add seconds to git sync period flag --- rust/crd/src/git_sync.rs | 4 ++-- rust/crd/src/lib.rs | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/rust/crd/src/git_sync.rs b/rust/crd/src/git_sync.rs index 0910e48b..43fed91c 100644 --- a/rust/crd/src/git_sync.rs +++ b/rust/crd/src/git_sync.rs @@ -5,7 +5,7 @@ use stackable_operator::{ }; use std::collections::BTreeMap; -use crate::{GIT_LINK, GIT_ROOT, GIT_SAFE_DIR, GIT_SYNC_DEPTH, GIT_SYNC_WAIT}; +use crate::{GIT_LINK, GIT_ROOT, GIT_SAFE_DIR, GIT_SYNC_DEPTH, GIT_SYNC_PERIOD_SECONDS}; #[derive(Clone, Debug, Default, Deserialize, JsonSchema, PartialEq, Eq, Serialize)] #[serde(rename_all = "camelCase")] @@ -46,7 +46,7 @@ impl GitSync { self.branch.clone().unwrap_or_else(|| "main".to_string()) ), format!("--depth={}", self.depth.unwrap_or(GIT_SYNC_DEPTH)), - format!("--period={}", self.wait.unwrap_or(GIT_SYNC_WAIT)), + format!("--period={}s", self.wait.unwrap_or(GIT_SYNC_PERIOD_SECONDS)), format!("--link={GIT_LINK}"), format!("--root={GIT_ROOT}"), ]; diff --git a/rust/crd/src/lib.rs b/rust/crd/src/lib.rs index c7de965a..36f5394e 100644 --- a/rust/crd/src/lib.rs +++ b/rust/crd/src/lib.rs @@ -62,7 +62,7 @@ pub const TEMPLATE_LOCATION: &str = "/templates"; pub const TEMPLATE_NAME: &str = "airflow_executor_pod_template.yaml"; const GIT_SYNC_DEPTH: u8 = 1u8; -const GIT_SYNC_WAIT: u16 = 20u16; +const GIT_SYNC_PERIOD_SECONDS: u16 = 20u16; const DEFAULT_AIRFLOW_GRACEFUL_SHUTDOWN_TIMEOUT: Duration = Duration::from_minutes_unchecked(2); const DEFAULT_WORKER_GRACEFUL_SHUTDOWN_TIMEOUT: Duration = Duration::from_minutes_unchecked(5);