Archived
Harden cleanup scheduler and audit cleanup deletions
This commit is contained in:
1 parent
24747866bc
commit
23ab466c52
4 files changed
+100
-1
No files matched your search
+6
-1
@@ -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)
|
||||
|
||||
|
||||
|
||||
Reference in new issue
Block a user