aboutsummaryrefslogtreecommitdiff
path: root/src/model
diff options
context:
space:
mode:
authorAlex Auvolat <alex@adnab.me>2022-12-12 17:16:49 +0100
committerAlex Auvolat <alex@adnab.me>2022-12-12 17:17:05 +0100
commitde9d6cddf709e686ada3d1e71de7b31d7704b8b5 (patch)
treece97129877b6d0b1839f22e42fa3d8e5fb9f07c7 /src/model
parentf7c65e830e66c9887d989a8281d8fae7f76f9c8c (diff)
downloadgarage-de9d6cddf709e686ada3d1e71de7b31d7704b8b5.tar.gz
garage-de9d6cddf709e686ada3d1e71de7b31d7704b8b5.zip
Prettier worker list table; remove useless CLI log messages
Diffstat (limited to 'src/model')
-rw-r--r--src/model/index_counter.rs11
1 files changed, 5 insertions, 6 deletions
diff --git a/src/model/index_counter.rs b/src/model/index_counter.rs
index e6394f0c..b9594406 100644
--- a/src/model/index_counter.rs
+++ b/src/model/index_counter.rs
@@ -404,14 +404,13 @@ impl<T: CountedItem> IndexPropagatorWorker<T> {
#[async_trait]
impl<T: CountedItem> Worker for IndexPropagatorWorker<T> {
fn name(&self) -> String {
- format!("{} index counter propagator", T::COUNTER_TABLE_NAME)
+ format!("{} counter", T::COUNTER_TABLE_NAME)
}
- fn info(&self) -> Option<String> {
- if !self.buf.is_empty() {
- Some(format!("{} items in queue", self.buf.len()))
- } else {
- None
+ fn status(&self) -> WorkerStatus {
+ WorkerStatus {
+ queue_length: Some(self.buf.len() as u64),
+ ..Default::default()
}
}