server: pull: fix sync info message for root namespace
The root namespace is displayed as empty string when used in the format string. Distinguish and explicitly write out the root namespace in the sync info message shown in the sync jobs task log. Signed-off-by: Christian Ebner <c.ebner@proxmox.com>
This commit is contained in:
parent
c7275ede6d
commit
b5b0b87eef
@ -1311,8 +1311,14 @@ pub(crate) async fn pull_store(mut params: PullParameters) -> Result<PullStats,
|
||||
if params.max_depth != Some(0) {
|
||||
groups += ns_progress.done_groups;
|
||||
snapshots += ns_progress.done_snapshots;
|
||||
|
||||
let ns = if namespace.is_root() {
|
||||
"root namespace".into()
|
||||
} else {
|
||||
format!("namespace {namespace}")
|
||||
};
|
||||
info!(
|
||||
"Finished syncing namespace {namespace}, current progress: {groups} groups, {snapshots} snapshots"
|
||||
"Finished syncing {ns}, current progress: {groups} groups, {snapshots} snapshots"
|
||||
);
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user