feat(09-01): implement retention cleanup service with configurable retention period
- Add CONFIG_RETENTION_DAYS setting (default 90) to config.py - Create retention_service.py with cleanup_expired_snapshots (parameterized SQL via make_interval) - APScheduler IntervalTrigger runs cleanup every 24h with 1h jitter - Prometheus counter and histogram for observability - CASCADE FKs handle diff/change deletion automatically - All 4 unit tests pass Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -125,6 +125,9 @@ class Settings(BaseSettings):
|
||||
PASSWORD_RESET_TOKEN_EXPIRE_MINUTES: int = 30
|
||||
APP_BASE_URL: str = "http://localhost:3000"
|
||||
|
||||
# Retention cleanup — delete config snapshots older than N days
|
||||
CONFIG_RETENTION_DAYS: int = 90
|
||||
|
||||
# App settings
|
||||
APP_NAME: str = "TOD - The Other Dude"
|
||||
APP_VERSION: str = "0.1.0"
|
||||
|
||||
Reference in New Issue
Block a user