move job scheduling to DB
This commit is contained in:
@@ -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",
|
||||
|
||||
Reference in New Issue
Block a user