[charts] Add periodic rebuilding of charts

This commit is contained in:
2026-03-23 15:54:14 -04:00
parent b61339b25c
commit 0917025cac
2 changed files with 65 additions and 3 deletions

View File

@ -121,10 +121,18 @@ CELERY_BEAT_SCHEDULE = {
"task": "scrobbles.tasks.create_yesterdays_charts",
"schedule": crontab(hour=0, minute=5),
},
"build-missing-charts-weekly": {
"task": "scrobbles.tasks.build_missing_charts_for_all_users",
"rebuild-weekly-charts": {
"task": "scrobbles.tasks.rebuild_weekly_charts",
"schedule": crontab(hour=1, minute=0, day_of_week=0),
},
"rebuild-monthly-charts": {
"task": "scrobbles.tasks.rebuild_monthly_charts",
"schedule": crontab(hour=0, minute=30, day_of_month=1),
},
"rebuild-yearly-charts": {
"task": "scrobbles.tasks.rebuild_yearly_charts",
"schedule": crontab(hour=0, minute=30, day_of_month=1, month_of_year=1),
},
}
INSTALLED_APPS = [