verify: allow '0' days for reverification
and let it mean that we will always reverify Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
This commit is contained in:
parent
7a524f1048
commit
7a1a5d206d
|
@ -145,8 +145,8 @@ pub const IGNORE_VERIFIED_BACKUPS_SCHEMA: Schema = BooleanSchema::new(
|
||||||
.schema();
|
.schema();
|
||||||
|
|
||||||
pub const VERIFICATION_OUTDATED_AFTER_SCHEMA: Schema = IntegerSchema::new(
|
pub const VERIFICATION_OUTDATED_AFTER_SCHEMA: Schema = IntegerSchema::new(
|
||||||
"Days after that a verification becomes outdated")
|
"Days after that a verification becomes outdated. (0 means always)")
|
||||||
.minimum(1)
|
.minimum(0)
|
||||||
.schema();
|
.schema();
|
||||||
|
|
||||||
#[api(
|
#[api(
|
||||||
|
|
|
@ -560,7 +560,7 @@ pub fn verify_filter(
|
||||||
let now = proxmox_time::epoch_i64();
|
let now = proxmox_time::epoch_i64();
|
||||||
let days_since_last_verify = (now - last_verify.upid.starttime) / 86400;
|
let days_since_last_verify = (now - last_verify.upid.starttime) / 86400;
|
||||||
|
|
||||||
days_since_last_verify > max_age
|
max_age == 0 || days_since_last_verify > max_age
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue