aboutsummaryrefslogtreecommitdiff
path: root/src/model
diff options
context:
space:
mode:
authorAlex Auvolat <alex@adnab.me>2022-06-24 10:31:11 +0200
committerAlex Auvolat <alex@adnab.me>2022-06-24 10:31:11 +0200
commit95ffba343f14d7274e08099b9aca5a85da2259ed (patch)
treef6a965fcce0a11dbab951e13acef24ab8ab7e9d9 /src/model
parent59b43914d4a9ae9a50ae79fee61b1a46bff941f9 (diff)
downloadgarage-95ffba343f14d7274e08099b9aca5a85da2259ed.tar.gz
garage-95ffba343f14d7274e08099b9aca5a85da2259ed.zip
Error reporting
Diffstat (limited to 'src/model')
-rw-r--r--src/model/index_counter.rs6
1 files changed, 5 insertions, 1 deletions
diff --git a/src/model/index_counter.rs b/src/model/index_counter.rs
index 9e29b421..474ec12c 100644
--- a/src/model/index_counter.rs
+++ b/src/model/index_counter.rs
@@ -408,7 +408,11 @@ impl<T: CountedItem> Worker for IndexPropagatorWorker<T> {
}
fn info(&self) -> Option<String> {
- Some(format!("{} items in queue", self.buf.len()))
+ if !self.buf.is_empty() {
+ Some(format!("{} items in queue", self.buf.len()))
+ } else {
+ None
+ }
}
async fn work(&mut self, must_exit: &mut watch::Receiver<bool>) -> Result<WorkerStatus, Error> {