Log which workers are doing what

This commit is contained in:
Alex Auvolat
2020-04-19 21:33:38 +00:00
parent ec7f9f07e2
commit 53cf4d1baa
5 changed files with 25 additions and 16 deletions
+8 -6
View File
@@ -96,18 +96,20 @@ where
table
.system
.background
.spawn_worker(move |must_exit: watch::Receiver<bool>| {
s1.watcher_task(must_exit, busy_rx)
})
.spawn_worker(
format!("table sync watcher for {}", table.name),
move |must_exit: watch::Receiver<bool>| s1.watcher_task(must_exit, busy_rx),
)
.await;
let s2 = syncer.clone();
table
.system
.background
.spawn_worker(move |must_exit: watch::Receiver<bool>| {
s2.syncer_task(must_exit, busy_tx)
})
.spawn_worker(
format!("table syncer for {}", table.name),
move |must_exit: watch::Receiver<bool>| s2.syncer_task(must_exit, busy_tx),
)
.await;
syncer