From 1135d48c97c6280daea3c8a9364eff94cb0d55ca Mon Sep 17 00:00:00 2001 From: Paul Campbell Date: Wed, 19 Jun 2024 07:03:25 +0100 Subject: [PATCH] WIP: cli: ??? --- crates/cli/src/main.rs | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/crates/cli/src/main.rs b/crates/cli/src/main.rs index 51e34cd..0954f93 100644 --- a/crates/cli/src/main.rs +++ b/crates/cli/src/main.rs @@ -8,6 +8,9 @@ use std::path::PathBuf; use clap::Parser; use kxio::{fs, network::Network}; +/// How long to wait between rechecking the status of a repo. +const SLEEP_DURATION: std::time::Duration = std::time::Duration::from_secs(10); + #[derive(Parser, Debug)] #[clap(version = clap::crate_version!(), author = clap::crate_authors!(), about = clap::crate_description!())] struct Commands { @@ -42,8 +45,7 @@ async fn main() { git_next_server::init(fs); } Server::Start => { - let sleep_duration = std::time::Duration::from_secs(10); - git_next_server::start(fs, net, repo, sleep_duration).await; + git_next_server::start(fs, net, repo, SLEEP_DURATION).await; } }, }