Background task manager #332

Merged
lx merged 35 commits from background-task-manager into main 2022-07-08 11:30:32 +00:00
Showing only changes of commit 8fb8569912 - Show all commits

View file

@ -597,11 +597,10 @@ impl<F: TableSchema + 'static, R: TableReplication + 'static> Worker for SyncWor
async fn wait_for_work(&mut self, _must_exit: &watch::Receiver<bool>) -> WorkerStatus { async fn wait_for_work(&mut self, _must_exit: &watch::Receiver<bool>) -> WorkerStatus {
select! { select! {
s = self.add_full_sync_rx.recv() => match s { s = self.add_full_sync_rx.recv() => {
Some(()) => { if let Some(()) = s {
self.add_full_sync(); self.add_full_sync();
} }
None => (),
}, },
_ = self.ring_recv.changed() => { _ = self.ring_recv.changed() => {
let new_ring = self.ring_recv.borrow(); let new_ring = self.ring_recv.borrow();