From 372e17caad864e39b4afbb3c38bdfe7d4fbcf924 Mon Sep 17 00:00:00 2001 From: alemi Date: Sat, 5 Nov 2022 18:35:10 +0100 Subject: [PATCH] feat: background worker runs in multi-threaded runtime --- src/main.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/main.rs b/src/main.rs index af38a23..2c82e12 100644 --- a/src/main.rs +++ b/src/main.rs @@ -93,7 +93,7 @@ fn main() { setup_tracing(None); let worker = std::thread::spawn(move || { - tokio::runtime::Builder::new_current_thread() + tokio::runtime::Builder::new_multi_thread() .enable_all() .build() .unwrap() @@ -114,7 +114,7 @@ fn main() { jobs.push( tokio::spawn( surveyor_loop( - db.clone(), + db, args.interval as i64, args.cache_time as i64, run_rx.clone(),