diff options
author | Alex Auvolat <alex@adnab.me> | 2022-06-24 10:31:11 +0200 |
---|---|---|
committer | Alex Auvolat <alex@adnab.me> | 2022-06-24 10:31:11 +0200 |
commit | 95ffba343f14d7274e08099b9aca5a85da2259ed (patch) | |
tree | f6a965fcce0a11dbab951e13acef24ab8ab7e9d9 /src/model/index_counter.rs | |
parent | 59b43914d4a9ae9a50ae79fee61b1a46bff941f9 (diff) | |
download | garage-95ffba343f14d7274e08099b9aca5a85da2259ed.tar.gz garage-95ffba343f14d7274e08099b9aca5a85da2259ed.zip |
Error reporting
Diffstat (limited to 'src/model/index_counter.rs')
-rw-r--r-- | src/model/index_counter.rs | 6 |
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> { |