diff --git a/Cargo.toml b/Cargo.toml index ef475ec92a2af090ad32cf5c1dbd1fb225c09adf..77bd8f654c32aa2501852302aded9ea64cb55dee 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -3,6 +3,7 @@ name = "org_flux" version = "0.1.0" edition = "2021" description = "A Rust web server that consumes org files for content" +license = "MIT" [package.metadata.deb] maintainer = "Stephen D <webmaster@scd31.com>" diff --git a/src/main.rs b/src/main.rs index 1fd6f72487048cd8de5b55407bacf381665dfd30..84c8341254f11266e6ac486346b677dd60d4c2df 100644 --- a/src/main.rs +++ b/src/main.rs @@ -98,7 +98,17 @@ async fn main() { tokio::task::spawn(async move { while signals.next().await.is_some() { println!("Reloading from disk..."); - let config = config.clone(); + + // reload config + let config = match Config::load() { + Ok(c) => c, + Err(e) => { + println!("Loading config failed: {e}"); + + continue; + } + }; + // reload blog match tokio::task::spawn_blocking(|| load_blog(config)) .await