From 7a026b7850dfb99d55f9c1cc764cdaa7171367b1 Mon Sep 17 00:00:00 2001 From: Ahtisham Shahid Date: Fri, 17 Jan 2020 14:29:30 +0500 Subject: [PATCH] created const for update_search_index --- cms/djangoapps/contentstore/tasks.py | 2 +- cms/envs/common.py | 3 +++ cms/envs/production.py | 3 +++ 3 files changed, 7 insertions(+), 1 deletion(-) diff --git a/cms/djangoapps/contentstore/tasks.py b/cms/djangoapps/contentstore/tasks.py index 593692528e..00519e6361 100644 --- a/cms/djangoapps/contentstore/tasks.py +++ b/cms/djangoapps/contentstore/tasks.py @@ -528,7 +528,7 @@ def _parse_time(time_isoformat): ).replace(tzinfo=UTC) -@task() +@task(routing_key=settings.UPDATE_SEARCH_INDEX_JOB_QUEUE) def update_search_index(course_id, triggered_time_isoformat): """ Updates course search index. """ try: diff --git a/cms/envs/common.py b/cms/envs/common.py index a73d7c1c85..562246fc00 100644 --- a/cms/envs/common.py +++ b/cms/envs/common.py @@ -1902,6 +1902,9 @@ VIDEO_TRANSCRIPT_MIGRATIONS_JOB_QUEUE = DEFAULT_PRIORITY_QUEUE ########## Settings youtube thumbnails scraper tasks ############ SCRAPE_YOUTUBE_THUMBNAILS_JOB_QUEUE = DEFAULT_PRIORITY_QUEUE +########## Settings update search index task ############ +UPDATE_SEARCH_INDEX_JOB_QUEUE = DEFAULT_PRIORITY_QUEUE + ###################### VIDEO IMAGE STORAGE ###################### VIDEO_IMAGE_DEFAULT_FILENAME = 'images/video-images/default_video_image.png' diff --git a/cms/envs/production.py b/cms/envs/production.py index 0aec2763e1..72e900a7a9 100644 --- a/cms/envs/production.py +++ b/cms/envs/production.py @@ -574,6 +574,9 @@ VIDEO_TRANSCRIPT_MIGRATIONS_JOB_QUEUE = ENV_TOKENS.get('VIDEO_TRANSCRIPT_MIGRATI ########## Settings youtube thumbnails scraper tasks ############ SCRAPE_YOUTUBE_THUMBNAILS_JOB_QUEUE = ENV_TOKENS.get('SCRAPE_YOUTUBE_THUMBNAILS_JOB_QUEUE', DEFAULT_PRIORITY_QUEUE) +########## Settings update search index task ############ +UPDATE_SEARCH_INDEX_JOB_QUEUE = ENV_TOKENS.get('UPDATE_SEARCH_INDEX_JOB_QUEUE', DEFAULT_PRIORITY_QUEUE) + ########################## Parental controls config ####################### # The age at which a learner no longer requires parental consent, or None