aboutsummaryrefslogtreecommitdiff
path: root/src/table/sync.rs
diff options
context:
space:
mode:
authorAlex Auvolat <alex@adnab.me>2022-06-21 17:18:16 +0200
committerAlex Auvolat <alex@adnab.me>2022-06-21 17:18:16 +0200
commit10c886111e304a53be24b29194f2127d91121929 (patch)
treebd61e98beeccfe338c1ae41a8c1322493f618dd2 /src/table/sync.rs
parent14337d2a561887b94ea165727dd49263717cb478 (diff)
downloadgarage-10c886111e304a53be24b29194f2127d91121929.tar.gz
garage-10c886111e304a53be24b29194f2127d91121929.zip
Rename things, garage worker list cmd
Diffstat (limited to 'src/table/sync.rs')
-rw-r--r--src/table/sync.rs11
1 files changed, 10 insertions, 1 deletions
diff --git a/src/table/sync.rs b/src/table/sync.rs
index be081d96..bdf88782 100644
--- a/src/table/sync.rs
+++ b/src/table/sync.rs
@@ -574,7 +574,16 @@ impl<F: TableSchema + 'static, R: TableReplication + 'static> SyncWorker<F, R> {
#[async_trait]
impl<F: TableSchema + 'static, R: TableReplication + 'static> Worker for SyncWorker<F, R> {
fn name(&self) -> String {
- format!("Table sync worker for {}", F::TABLE_NAME)
+ format!("{} sync", F::TABLE_NAME)
+ }
+
+ fn info(&self) -> Option<String> {
+ let l = self.todo.len();
+ if l > 0 {
+ Some(format!("{} partitions remaining", l))
+ } else {
+ None
+ }
}
async fn work(&mut self, must_exit: &mut watch::Receiver<bool>) -> Result<WorkerStatus, Error> {