Skip to content
Snippets Groups Projects
Commit 306fba7c authored by Stephen D's avatar Stephen D
Browse files

reload config on new files

parent f2e12599
No related branches found
No related tags found
No related merge requests found
Pipeline #8890 passed
......@@ -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>"
......
......@@ -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
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment