]> git.proxmox.com Git - proxmox-backup.git/commitdiff
verify: allow '0' days for reverification
authorDominik Csapak <d.csapak@proxmox.com>
Thu, 27 Jan 2022 14:13:19 +0000 (15:13 +0100)
committerThomas Lamprecht <t.lamprecht@proxmox.com>
Thu, 27 Jan 2022 14:31:55 +0000 (15:31 +0100)
and let it mean that we will always reverify

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
pbs-api-types/src/jobs.rs
src/backup/verify.rs

index c66641048cfe3699441fc5128a3579ac0f0562c7..0e83da733dcf9922f6588a48ac91cc247dea2dc2 100644 (file)
@@ -145,8 +145,8 @@ pub const IGNORE_VERIFIED_BACKUPS_SCHEMA: Schema = BooleanSchema::new(
     .schema();
 
 pub const VERIFICATION_OUTDATED_AFTER_SCHEMA: Schema = IntegerSchema::new(
-    "Days after that a verification becomes outdated")
-    .minimum(1)
+    "Days after that a verification becomes outdated. (0 means always)")
+    .minimum(0)
     .schema();
 
 #[api(
index e37c63be81090d332be7df7be3fdc56ac4fbfaba..e835d625ec3d2ee36041d33aa3f4383ec2705907 100644 (file)
@@ -560,7 +560,7 @@ pub fn verify_filter(
                     let now = proxmox_time::epoch_i64();
                     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
                 }
             }
         }