feat(trash): daily retention purge scheduler (03:30 UTC) wired into app lifecycle

This commit is contained in:
2026-05-29 11:47:02 -04:00
parent a40334312f
commit d8f577e753
2 changed files with 76 additions and 0 deletions
+6
View File
@@ -175,6 +175,10 @@ def create_app() -> Quart:
)
start_version_pinning_scheduler(asyncio.get_running_loop())
# Trash retention scheduler (daily expired-trash purge at 03:30 UTC)
from fabledassistant.services.trash_scheduler import start_trash_scheduler
start_trash_scheduler(asyncio.get_running_loop())
# Diagnostic instrumentation — heartbeat, signal handlers, asyncio
# exception hook. Cheap (~1 log line/min), high diagnostic value when
# the app crashes mysteriously. See services/diagnostics.py.
@@ -189,6 +193,8 @@ def create_app() -> Quart:
stop_version_pinning_scheduler,
)
stop_version_pinning_scheduler()
from fabledassistant.services.trash_scheduler import stop_trash_scheduler
stop_trash_scheduler()
from fabledassistant.services.diagnostics import stop_diagnostics
stop_diagnostics()