mirror of
https://github.com/pacnpal/thrilltrack-explorer.git
synced 2025-12-21 11:51:14 -05:00
Add automated data retention cleanup
Implements edge function, Django tasks, and UI hooks/panels for automatic retention of old metrics, anomalies, alerts, and incidents, plus updates to query keys and monitoring dashboard to reflect data-retention workflows.
This commit is contained in:
@@ -33,6 +33,25 @@ CELERY_BEAT_SCHEDULE = {
|
||||
'options': {'queue': 'monitoring'}
|
||||
},
|
||||
|
||||
# Data retention cleanup tasks
|
||||
'run-data-retention-cleanup': {
|
||||
'task': 'monitoring.run_data_retention_cleanup',
|
||||
'schedule': crontab(hour=3, minute=0), # Daily at 3 AM
|
||||
'options': {'queue': 'maintenance'}
|
||||
},
|
||||
|
||||
'cleanup-old-metrics': {
|
||||
'task': 'monitoring.cleanup_old_metrics',
|
||||
'schedule': crontab(hour=3, minute=30), # Daily at 3:30 AM
|
||||
'options': {'queue': 'maintenance'}
|
||||
},
|
||||
|
||||
'cleanup-old-anomalies': {
|
||||
'task': 'monitoring.cleanup_old_anomalies',
|
||||
'schedule': crontab(hour=4, minute=0), # Daily at 4 AM
|
||||
'options': {'queue': 'maintenance'}
|
||||
},
|
||||
|
||||
# Existing user tasks
|
||||
'cleanup-expired-tokens': {
|
||||
'task': 'users.cleanup_expired_tokens',
|
||||
|
||||
Reference in New Issue
Block a user