diff --git a/ol/cli/src/commands/serve_cmd.rs b/ol/cli/src/commands/serve_cmd.rs index 79320514e1..1d1a8c3b39 100644 --- a/ol/cli/src/commands/serve_cmd.rs +++ b/ol/cli/src/commands/serve_cmd.rs @@ -8,7 +8,7 @@ use abscissa_core::{Command, Options, Runnable}; #[derive(Command, Debug, Options)] pub struct ServeCmd { /// Start healthcheck runner - #[options(short = "c", help = "start health check runner")] + #[options(short = "c", help = "deprecation notice: -c is no longer valid. Previously it was necessary if healthchecks were to be updated while server is running, but now we assume that is the intention of the user.")] run_checks: bool, /// Update the web files #[options(no_short, help = "update web files for server")] @@ -32,8 +32,8 @@ impl Runnable for ServeCmd { }, }; let mut node = Node::new(client, &cfg, is_swarm); - server::init(&mut node, self.run_checks); - server::start_server(node, self.run_checks); + server::init(&mut node, true); + server::start_server(node, true); } } } diff --git a/ol/cli/src/server.rs b/ol/cli/src/server.rs index 4d7b5be6a6..18b82c0cc3 100644 --- a/ol/cli/src/server.rs +++ b/ol/cli/src/server.rs @@ -14,14 +14,14 @@ use crate::{cache::Vitals, check::runner, node::node::Node}; #[tokio::main] /// starts the web server -pub async fn start_server(mut node: Node, run_checks: bool) { +pub async fn start_server(mut node: Node, _run_checks: bool) { let cfg = node.app_conf.clone(); - if run_checks { + // if run_checks { thread::spawn(move || { runner::run_checks(&mut node, false, true, false, false); }); - } + // } //GET check/ (json api for check data) let node_home = cfg.clone().workspace.node_home.clone(); @@ -82,15 +82,15 @@ pub async fn start_server(mut node: Node, run_checks: bool) { } /// Prepare to start server -pub fn init(node: &mut Node, run_checks: bool) { - if run_checks { +pub fn init(node: &mut Node, _run_checks: bool) { + // if run_checks { /* Initialize cache to avoid: - read a cache file not created yet - load old cache with invalid structs */ node.check_once(false); - } + // } } fn sse_vitals(data: Vitals) -> Result {