verify: factor out common parameters
all the verify methods pass along the following: - task worker - datastore - corrupt and verified chunks might as well pull that out into a common type, with the added bonus of now having a single point for construction instead of copying the default capacaties in three different modules.. Signed-off-by: Fabian Grünbichler <f.gruenbichler@proxmox.com>
This commit is contained in:
committed by
Wolfgang Bumiller
parent
93e3581ce7
commit
9c26a3d61a
@ -67,7 +67,8 @@ pub fn do_verification_job(
|
||||
task_log!(worker,"task triggered by schedule '{}'", event_str);
|
||||
}
|
||||
|
||||
let result = verify_all_backups(datastore, worker.clone(), worker.upid(), None, Some(&filter));
|
||||
let verify_worker = crate::backup::VerifyWorker::new(worker.clone(), datastore);
|
||||
let result = verify_all_backups(&verify_worker, worker.upid(), None, Some(&filter));
|
||||
let job_result = match result {
|
||||
Ok(ref failed_dirs) if failed_dirs.is_empty() => Ok(()),
|
||||
Ok(ref failed_dirs) => {
|
||||
|
Reference in New Issue
Block a user