From b4a1d99ae113cde45de18ea7f96d17a690e1d6d6 Mon Sep 17 00:00:00 2001 From: George Lacey Date: Wed, 13 Apr 2022 07:22:17 +0100 Subject: [PATCH] Update warning and error timings --- borgweb/borg/models/repo.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/borgweb/borg/models/repo.py b/borgweb/borg/models/repo.py index c23489d..08647e0 100644 --- a/borgweb/borg/models/repo.py +++ b/borgweb/borg/models/repo.py @@ -11,10 +11,10 @@ class Repo(models.Model): last_modified = models.DateTimeField() label = models.OneToOneField(Label, on_delete=models.CASCADE, unique=True) - def warning(self, hours_ago=2): + def warning(self, hours_ago=4): return not self.latest_archive().start > datetime.utcnow() - timedelta(hours=hours_ago) - def error(self, hours_ago=4): + def error(self, hours_ago=12): latest_archive = self.latest_archive() if latest_archive is None or not self.archive_after_latest_error(): return True