mirror of
https://git.alemi.dev/dashboard.git
synced 2024-11-14 19:59:18 +01:00
feat: background worker runs in multi-threaded runtime
This commit is contained in:
parent
ddf237861c
commit
372e17caad
1 changed files with 2 additions and 2 deletions
|
@ -93,7 +93,7 @@ fn main() {
|
||||||
setup_tracing(None);
|
setup_tracing(None);
|
||||||
|
|
||||||
let worker = std::thread::spawn(move || {
|
let worker = std::thread::spawn(move || {
|
||||||
tokio::runtime::Builder::new_current_thread()
|
tokio::runtime::Builder::new_multi_thread()
|
||||||
.enable_all()
|
.enable_all()
|
||||||
.build()
|
.build()
|
||||||
.unwrap()
|
.unwrap()
|
||||||
|
@ -114,7 +114,7 @@ fn main() {
|
||||||
jobs.push(
|
jobs.push(
|
||||||
tokio::spawn(
|
tokio::spawn(
|
||||||
surveyor_loop(
|
surveyor_loop(
|
||||||
db.clone(),
|
db,
|
||||||
args.interval as i64,
|
args.interval as i64,
|
||||||
args.cache_time as i64,
|
args.cache_time as i64,
|
||||||
run_rx.clone(),
|
run_rx.clone(),
|
||||||
|
|
Loading…
Reference in a new issue