From 5656888cc941807f15e37b017d96de0112ab896e Mon Sep 17 00:00:00 2001 From: Dietmar Maurer Date: Thu, 10 Sep 2020 08:54:29 +0200 Subject: [PATCH] verify: fix done count We need to filter out benchmark group earlier --- src/backup/verify.rs | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/src/backup/verify.rs b/src/backup/verify.rs index d296b5de..b75cdfb8 100644 --- a/src/backup/verify.rs +++ b/src/backup/verify.rs @@ -391,7 +391,10 @@ pub fn verify_all_backups(datastore: Arc, worker: Arc) -> let mut errors = Vec::new(); let mut list = match BackupGroup::list_groups(&datastore.base_path()) { - Ok(list) => list, + Ok(list) => list + .into_iter() + .filter(|group| !(group.backup_type() == "host" && group.backup_id() == "benchmark")) + .collect::>(), Err(err) => { worker.log(format!("verify datastore {} - unable to list backups: {}", datastore.name(), err)); return Ok(errors); @@ -415,10 +418,6 @@ pub fn verify_all_backups(datastore: Arc, worker: Arc) -> let mut done = 0; for group in list { - if group.backup_type() == "host" && group.backup_id() == "benchmark" { - continue; - } - let (count, mut group_errors) = verify_backup_group( datastore.clone(), &group,