From deceaad4d1c746c942df63d290109b1472c73624 Mon Sep 17 00:00:00 2001 From: kjuulh Date: Sun, 24 Nov 2024 01:13:09 +0100 Subject: [PATCH] feat: added longer timer Signed-off-by: kjuulh --- crates/churn/src/agent/refresh.rs | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/crates/churn/src/agent/refresh.rs b/crates/churn/src/agent/refresh.rs index 3de97cc..a9b3d4f 100644 --- a/crates/churn/src/agent/refresh.rs +++ b/crates/churn/src/agent/refresh.rs @@ -23,7 +23,7 @@ impl notmad::Component for AgentRefresh { &self, cancellation_token: tokio_util::sync::CancellationToken, ) -> Result<(), notmad::MadError> { - let cancel = nodrift::schedule_drifter(std::time::Duration::from_secs(5), self.clone()); + let cancel = nodrift::schedule_drifter(std::time::Duration::from_secs(60), self.clone()); tokio::select! { _ = cancel.cancelled() => {}, _ = cancellation_token.cancelled() => { @@ -89,8 +89,8 @@ impl Task { } pub async fn execute(&self) -> anyhow::Result<()> { - let mut cmd = tokio::process::Command::new("apt"); - cmd.args(["apt-get", "update", "-q"]); + let mut cmd = tokio::process::Command::new("apt-get"); + cmd.args(["update", "-q"]); let output = cmd.output().await.context("failed to run apt update")?; match output.status.success() { true => tracing::info!("successfully ran apt update"), @@ -102,9 +102,9 @@ impl Task { } } - let mut cmd = tokio::process::Command::new("apt"); + let mut cmd = tokio::process::Command::new("apt-get"); cmd.env("DEBIAN_FRONTEND", "noninteractive") - .args(["apt-get", "upgrade", "-y"]); + .args(["upgrade", "-y"]); let output = cmd.output().await.context("failed to run apt upgrade")?; match output.status.success() { true => tracing::info!("successfully ran apt upgrade"),