move job scheduling to DB

This commit is contained in:
Bryan Van Deusen
2026-01-24 23:50:09 -05:00
parent 61e9336eef
commit dc6755a0c2
8 changed files with 50 additions and 12 deletions
+5 -2
View File
@@ -28,10 +28,13 @@ celery_app.conf.update(
)
# Celery Beat schedule for periodic tasks
# Note: The scheduler runs frequently (every 60s) but only triggers downloads
# for sources whose individual check_interval has elapsed. Per-source intervals
# are stored in the database and can be configured via the UI.
celery_app.conf.beat_schedule = {
"check-sources-hourly": {
"check-sources-scheduler": {
"task": "app.tasks.downloads.scheduled_check",
"schedule": settings.default_check_interval, # Default: every hour
"schedule": 60, # Run every 60 seconds to check for due sources
},
"cleanup-old-downloads-daily": {
"task": "app.tasks.downloads.cleanup_old_downloads",