Tell administrators about a location without a schedule

A notification when a schedule is turned off, then a reminder: once a week while another
location is backed up, every day when none is. The round trip now also checks the text of
these notifications and of the one about names, and that one location never gets two runs.
This commit is contained in:
2026-11-07 00:23:28 +01:00
parent e58b86fc48
commit 36f2427e9a
8 changed files with 97 additions and 12 deletions
+4 -1
View File
@@ -59,8 +59,11 @@ final class BackupJob extends TimedJob {
}
$this->failStaleRestores();
$this->weeklyPrune();
foreach ($this->targets->list() as $t) {
$targets = $this->targets->list();
foreach ($targets as $t) {
$this->alerts->checkStale($t);
$othersActive = array_filter($targets, static fn ($o) => $o->getId() !== $t->getId() && (string)$o->getSchedule() !== '') !== [];
$this->alerts->checkOff($t, $othersActive);
}
}