Skip to content

Commit

Permalink
Make discussions sync crontab configurable
Browse files Browse the repository at this point in the history
  • Loading branch information
rhysyngsun committed Jan 13, 2025
1 parent ef59f41 commit 38a3bf6
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion micromasters/settings.py
Original file line number Diff line number Diff line change
Expand Up @@ -497,6 +497,7 @@
CELERY_TASK_ALWAYS_EAGER = get_bool("CELERY_TASK_ALWAYS_EAGER", False) or get_bool("CELERY_ALWAYS_EAGER", False)
CELERY_TASK_EAGER_PROPAGATES = (get_bool("CELERY_TASK_EAGER_PROPAGATES", True) or
get_bool("CELERY_EAGER_PROPAGATES_EXCEPTIONS", True))
CRONTAB_DISCUSSIONS_SYNC = get_string("CRONTAB_DISCUSSIONS_SYNC", None)
CELERY_BEAT_SCHEDULE = {
'batch-update-user-data-every-friday-every-6-hrs': {
'task': 'dashboard.tasks.batch_update_user_data',
Expand All @@ -516,7 +517,7 @@
},
'discussions-sync-memberships-every-minute': {
'task': 'discussions.tasks.sync_channel_memberships',
'schedule': crontab(minute='*', hour='*')
'schedule': crontab(*CRONTAB_DISCUSSIONS_SYNC.split()) if CRONTAB_DISCUSSIONS_SYNC else crontab(minute='*', hour='*')
},
'freeze-final-grades-every-24-hrs-few-times': {
'task': 'grades.tasks.find_course_runs_and_freeze_grades',
Expand Down

0 comments on commit 38a3bf6

Please sign in to comment.