Skip to content

Commit

Permalink
fix(celery): correct crontab syntax for Celery Beat scheduler (#5386)
Browse files Browse the repository at this point in the history
### 📣 Summary
Fixed an issue with incorrect crontab syntax in the Celery Beat
scheduler.


### 📖 Description
An issue with the crontab syntax in the Celery Beat scheduler prevented
periodic tasks from running correctly. This fix updates the syntax to
conform to the expected format.
  • Loading branch information
noliveleger authored Dec 18, 2024
1 parent c71dde8 commit 9471b34
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions kobo/settings/base.py
Original file line number Diff line number Diff line change
Expand Up @@ -1160,11 +1160,11 @@ def dj_stripe_request_callback_method():
# Schedule every 30 minutes
'trash-bin-garbage-collector': {
'task': 'kobo.apps.trash_bin.tasks.garbage_collector',
'schedule': crontab(minute=30),
'schedule': crontab(minute='*/30'),
'options': {'queue': 'kpi_low_priority_queue'},
},
'perform-maintenance': {
'task': 'kobo.tasks.perform_maintenance',
'task': 'kpi.tasks.perform_maintenance',
'schedule': crontab(hour=20, minute=0),
'options': {'queue': 'kpi_low_priority_queue'},
},
Expand All @@ -1181,19 +1181,19 @@ def dj_stripe_request_callback_method():
# Schedule every 10 minutes
'project-ownership-task-scheduler': {
'task': 'kobo.apps.project_ownership.tasks.task_rescheduler',
'schedule': crontab(minute=10),
'schedule': crontab(minute='*/10'),
'options': {'queue': 'kpi_low_priority_queue'}
},
# Schedule every 30 minutes
'project-ownership-mark-stuck-tasks-as-failed': {
'task': 'kobo.apps.project_ownership.tasks.mark_stuck_tasks_as_failed',
'schedule': crontab(minute=30),
'schedule': crontab(minute='*/30'),
'options': {'queue': 'kpi_low_priority_queue'}
},
# Schedule every 30 minutes
'project-ownership-mark-as-expired': {
'task': 'kobo.apps.project_ownership.tasks.mark_as_expired',
'schedule': crontab(minute=30),
'schedule': crontab(minute='*/30'),
'options': {'queue': 'kpi_low_priority_queue'}
},
# Schedule every day at midnight UTC
Expand Down

0 comments on commit 9471b34

Please sign in to comment.