Skip to content

Commit

Permalink
add seconds to git sync period flag
Browse files Browse the repository at this point in the history
  • Loading branch information
maltesander committed Feb 15, 2024
1 parent 3d93bf3 commit 104d02d
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions rust/crd/src/git_sync.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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")]
Expand Down Expand Up @@ -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}"),
];
Expand Down
2 changes: 1 addition & 1 deletion rust/crd/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down

0 comments on commit 104d02d

Please sign in to comment.