Harden cleanup scheduler and audit cleanup deletions

This commit is contained in:
StasonJatham committed 2026-05-27 16:52:18 +02:00
1 parent 24747866bc
commit 23ab466c52
4 files changed
+100 -1

No files matched your search

+6 -1
View File
@@ -104,7 +104,12 @@ def make_app(settings: DdnsSettings | None = None) -> FastAPI:
async def _scheduler_loop(store: DdnsStore, settings: DdnsSettings) -> None:
poll_seconds = min(settings.cleanup_interval_seconds, 60)
while True:
await _run_cleanup_if_due(store, settings)
try:
await _run_cleanup_if_due(store, settings)
except asyncio.CancelledError:
raise
except Exception:
LOGGER.exception("Scheduled cleanup loop crashed; continuing")
await asyncio.sleep(poll_seconds)