Add watchdog for missed launchd runs, add backup retention

Mirrors the same fix on the Lotto sibling project. watchdog.py
(com.eurojackpot.watchdog.plist, daily 09:00) checks whether the
latest draw or trained models are older than the launchd schedule
allows and alerts via EurojackpotNotifier.send_error() - catches a
silently-missed StartCalendarInterval run (e.g. Mac asleep at the
scheduled time) that launchd itself never retries.

EurojackpotAPIUpdater.create_backup() didn't have Lotto's path bug,
but had the same unbounded growth (85 backups, 2.4MB accumulated).
Adds retention (keep last 30) and prunes the existing backlog.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
This commit is contained in:
cbazzaandClaude Sonnet 5 committed 2026-09-12 10:02:40 +02:00
1 parent c39babade4
commit 416c646fd9
12 files changed
+144 -7306

No files matched your search

+4
View File
@@ -0,0 +1,4 @@
#!/bin/bash
cd "/Users/sebastianfrohlich/Projekte/Eurojackpot"
source venv/bin/activate
python scripts/utils/watchdog.py