feat: background worker runs in multi-threaded runtime

This commit is contained in:
əlemi 2022-11-05 18:35:10 +01:00
parent ddf237861c
commit 372e17caad
Signed by: alemi
GPG key ID: A4895B84D311642C

View file

@ -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(),