Add auto-cleanup of old unannotated events

🧹 New features:
- Background thread cleans up old events automatically
- Deletes unannotated events older than EVENT_EXPIRY_HOURS (default: 2h)
- Also removes associated snapshot files
- Runs every CLEANUP_INTERVAL_MINUTES (default: 5m)

📡 New endpoint:
- POST /cleanup - Manually trigger cleanup

⚙️ Config (env vars):
- EVENT_EXPIRY_HOURS: How long to keep unannotated events (default: 2.0)
- CLEANUP_INTERVAL_MINUTES: How often to run cleanup (default: 5.0)

Annotated events are kept forever 🦊
This commit is contained in:
2025-12-16 19:40:44 -06:00
parent ae2bd94006
commit e31eb49d5a
2 changed files with 112 additions and 3 deletions

0
collector/setup-macos.sh Normal file → Executable file
View File