[tasks] Move tasks out of cron and into celerybeat
Some checks failed
build & deploy / build-and-deploy (push) Has been cancelled
build & deploy / test (push) Has been cancelled

This commit is contained in:
2026-05-22 11:38:22 -04:00
parent b9324d6443
commit 86c495f22f
2 changed files with 247 additions and 0 deletions

View File

@ -126,6 +126,39 @@ CELERY_BEAT_SCHEDULE = {
"task": "scrobbles.tasks.rebuild_yearly_charts",
"schedule": crontab(hour=0, minute=30, day_of_month=1, month_of_year=1),
},
# ── Crontab replacements ─────────────────────────────────────────────
"database-backup": {
"task": "scrobbles.tasks.backup_database",
"schedule": crontab(hour=0, minute=0),
},
"import-from-lastfm": {
"task": "scrobbles.tasks.import_from_lastfm_all_users",
"schedule": crontab(minute="*/30"),
},
"import-from-retroarch": {
"task": "scrobbles.tasks.import_from_retroarch_all_users",
"schedule": crontab(hour=0, minute=0),
},
"import-from-webdav": {
"task": "scrobbles.tasks.import_from_webdav_all_users",
"schedule": crontab(minute="*/2"),
},
"import-from-imap": {
"task": "scrobbles.tasks.import_from_imap_all_users",
"schedule": crontab(minute="*/4"),
},
"import-from-lichess": {
"task": "scrobbles.tasks.import_from_lichess_all_users",
"schedule": crontab(minute="*/20"),
},
"send-notification-for-in-progress": {
"task": "scrobbles.tasks.send_notification_for_in_progress",
"schedule": crontab(minute="*/3"),
},
"send-mood-checkin": {
"task": "scrobbles.tasks.send_mood_checkin",
"schedule": crontab(hour="*", minute=0),
},
}
INSTALLED_APPS = [