diff options
author | Alex Auvolat <alex@adnab.me> | 2022-07-08 10:45:20 +0200 |
---|---|---|
committer | Alex Auvolat <alex@adnab.me> | 2022-07-08 10:45:20 +0200 |
commit | 08cd5f2f1d4a42e63a256eb3a7811e874d222fe4 (patch) | |
tree | 256ee885e93cf1c41dc2869fe13a648aa91ab9b5 /src/block | |
parent | 18d014dcc5840e5eae8581a5bfa846aad93beeea (diff) | |
download | garage-background-task-manager.tar.gz garage-background-task-manager.zip |
cargo fmtbackground-task-manager
Diffstat (limited to 'src/block')
-rw-r--r-- | src/block/manager.rs | 5 | ||||
-rw-r--r-- | src/block/repair.rs | 10 |
2 files changed, 3 insertions, 12 deletions
diff --git a/src/block/manager.rs b/src/block/manager.rs index e54fb992..017ba9da 100644 --- a/src/block/manager.rs +++ b/src/block/manager.rs @@ -773,10 +773,7 @@ impl Worker for ResyncWorker { } } - async fn work( - &mut self, - _must_exit: &mut watch::Receiver<bool>, - ) -> Result<WorkerState, Error> { + async fn work(&mut self, _must_exit: &mut watch::Receiver<bool>) -> Result<WorkerState, Error> { self.tranquilizer.reset(); match self.manager.resync_iter().await { Ok(ResyncIterResult::BusyDidSomething) => Ok(self diff --git a/src/block/repair.rs b/src/block/repair.rs index cd5afe44..07ff6772 100644 --- a/src/block/repair.rs +++ b/src/block/repair.rs @@ -62,10 +62,7 @@ impl Worker for RepairWorker { } } - async fn work( - &mut self, - _must_exit: &mut watch::Receiver<bool>, - ) -> Result<WorkerState, Error> { + async fn work(&mut self, _must_exit: &mut watch::Receiver<bool>) -> Result<WorkerState, Error> { match self.block_iter.as_mut() { None => { // Phase 1: Repair blocks from RC table. @@ -279,10 +276,7 @@ impl Worker for ScrubWorker { )) } - async fn work( - &mut self, - _must_exit: &mut watch::Receiver<bool>, - ) -> Result<WorkerState, Error> { + async fn work(&mut self, _must_exit: &mut watch::Receiver<bool>) -> Result<WorkerState, Error> { match self.rx_cmd.try_recv() { Ok(cmd) => self.handle_cmd(cmd).await, Err(mpsc::error::TryRecvError::Disconnected) => return Ok(WorkerState::Done), |