From 84e946f661b5609647a4b754eeb17b892955ff15 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Phil=20H=C3=B6fer?= <phil.hoefer@suma-ev.de> Date: Mon, 22 Jul 2024 14:03:22 +0200 Subject: [PATCH] More Frequent DB Update --- src/main.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/main.rs b/src/main.rs index 1ae37da..dd3193f 100644 --- a/src/main.rs +++ b/src/main.rs @@ -139,7 +139,7 @@ fn process_request(request: tiny_http::Request, config: HashMap<String, String>, request.respond(response); let now = std::time::SystemTime::now(); let elapsed = now.duration_since(last_update).expect("Time went backwards"); - if elapsed >= std::time::Duration::from_secs(24 * 60 * 60) { + if elapsed >= std::time::Duration::from_secs(2 * 60 * 60) { //every 2h markov_chain.decay(); read_from_db(config.clone(), markov_chain); last_update = now; -- GitLab