verify job: support max-depth config
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
This commit is contained in:
@ -157,6 +157,8 @@ pub enum DeletableProperty {
|
||||
OutdatedAfter,
|
||||
/// Delete namespace property, defaulting to root namespace then.
|
||||
Ns,
|
||||
/// Delete max-depth property, defaulting to full recursion again
|
||||
MaxDepth,
|
||||
}
|
||||
|
||||
#[api(
|
||||
@ -239,6 +241,9 @@ pub fn update_verification_job(
|
||||
DeletableProperty::Ns => {
|
||||
data.ns = None;
|
||||
}
|
||||
DeletableProperty::MaxDepth => {
|
||||
data.max_depth = None;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -278,6 +283,11 @@ pub fn update_verification_job(
|
||||
data.ns = Some(ns);
|
||||
}
|
||||
}
|
||||
if let Some(max_depth) = update.max_depth {
|
||||
if max_depth <= pbs_api_types::MAX_NAMESPACE_DEPTH {
|
||||
data.max_depth = Some(max_depth);
|
||||
}
|
||||
}
|
||||
|
||||
config.set_data(&id, "verification", &data)?;
|
||||
|
||||
|
@ -50,7 +50,7 @@ pub fn do_verification_job(
|
||||
&verify_worker,
|
||||
worker.upid(),
|
||||
ns,
|
||||
None,
|
||||
verification_job.max_depth,
|
||||
None,
|
||||
Some(&move |manifest| {
|
||||
verify_filter(ignore_verified_snapshots, outdated_after, manifest)
|
||||
|
Reference in New Issue
Block a user