From 975f17968df9527c9191647cf00d8a7df4830b55 Mon Sep 17 00:00:00 2001 From: Feanil Patel Date: Tue, 28 Apr 2015 09:35:11 -0400 Subject: [PATCH 01/11] Update to the latest version of celery, and django-celery. Changelog for 3.1 can be found here: http://celery.readthedocs.org/en/latest/whatsnew-3.1.html Changelog from 3.1.0 to 3.1.18 can be found here: http://celery.readthedocs.org/en/latest/changelog.html --- requirements/edx/base.txt | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/requirements/edx/base.txt b/requirements/edx/base.txt index fb7d6ba80c..9b448542dd 100644 --- a/requirements/edx/base.txt +++ b/requirements/edx/base.txt @@ -9,13 +9,13 @@ beautifulsoup==3.2.1 bleach==1.4 html5lib==0.999 boto==2.32.1 -celery==3.0.19 +celery==3.1.18 cssselect==0.9.1 dealer==2.0.4 defusedxml==0.4.1 distribute>=0.6.28, <0.7 django-babel-underscore==0.1.0 -django-celery==3.0.17 +django-celery==3.1.16 django-countries==2.1.2 django-extensions==1.2.5 django-filter==0.6.0 From dae643bee29b426e0eefe13342727b651717641d Mon Sep 17 00:00:00 2001 From: Feanil Patel Date: Thu, 30 Apr 2015 10:21:24 -0400 Subject: [PATCH 02/11] Update ora2 to match the new version of celery. --- requirements/edx/github.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/requirements/edx/github.txt b/requirements/edx/github.txt index 1b4aae6d59..1dc3e7b663 100644 --- a/requirements/edx/github.txt +++ b/requirements/edx/github.txt @@ -34,7 +34,7 @@ git+https://github.com/pmitros/pyfs.git@96e1922348bfe6d99201b9512a9ed946c87b7e0b -e git+https://github.com/edx/bok-choy.git@82d2f4b72e807b10d112179c0a4abd810a001b82#egg=bok_choy -e git+https://github.com/edx-solutions/django-splash.git@7579d052afcf474ece1239153cffe1c89935bc4f#egg=django-splash -e git+https://github.com/edx/acid-block.git@e46f9cda8a03e121a00c7e347084d142d22ebfb7#egg=acid-xblock --e git+https://github.com/edx/edx-ora2.git@release-2015-05-07T14.06#egg=edx-ora2 +-e git+https://github.com/edx/edx-ora2.git@feanil/update_celery#egg=edx-ora2 -e git+https://github.com/edx/edx-submissions.git@e2361932b9bce061a018a31bb3929e9cade80f49#egg=edx-submissions -e git+https://github.com/edx/opaque-keys.git@1254ed4d615a428591850656f39f26509b86d30a#egg=opaque-keys -e git+https://github.com/edx/ease.git@c6dee053eae6b3ac4fdf6be11fa7a9f8265540aa#egg=ease From 34df5a32d2604e3c3d7ff0d74d8cf779003defe4 Mon Sep 17 00:00:00 2001 From: Feanil Patel Date: Thu, 30 Apr 2015 16:02:10 -0400 Subject: [PATCH 03/11] Get LMS tests passing. --- lms/__init__.py | 5 +++++ lms/celery.py | 17 +++++++++++++++++ lms/envs/bok_choy.py | 3 ++- lms/envs/test.py | 1 + 4 files changed, 25 insertions(+), 1 deletion(-) create mode 100644 lms/celery.py diff --git a/lms/__init__.py b/lms/__init__.py index e69de29bb2..b64e43e83b 100644 --- a/lms/__init__.py +++ b/lms/__init__.py @@ -0,0 +1,5 @@ +from __future__ import absolute_import + +# This will make sure the app is always imported when +# Django starts so that shared_task will use this app. +from .celery import app as celery_app diff --git a/lms/celery.py b/lms/celery.py new file mode 100644 index 0000000000..fc8bd655bf --- /dev/null +++ b/lms/celery.py @@ -0,0 +1,17 @@ +from __future__ import absolute_import + +import os + +from celery import Celery + +from django.conf import settings + +# set the default Django settings module for the 'celery' program. +os.environ.setdefault('DJANGO_SETTINGS_MODULE', 'proj.settings') + +app = Celery('proj') + +# Using a string here means the worker will not have to +# pickle the object when using Windows. +app.config_from_object('django.conf:settings') +app.autodiscover_tasks(lambda: settings.INSTALLED_APPS) diff --git a/lms/envs/bok_choy.py b/lms/envs/bok_choy.py index 75e66f4215..f60ff4d089 100644 --- a/lms/envs/bok_choy.py +++ b/lms/envs/bok_choy.py @@ -56,7 +56,8 @@ MEDIA_URL = "/static/uploads/" CELERY_ALWAYS_EAGER = True CELERY_RESULT_BACKEND = 'cache' -BROKER_TRANSPORT = 'memory' +CELERY_CACHE_BACKEND = 'memory' +#BROKER_TRANSPORT = 'memory' ###################### Grade Downloads ###################### GRADES_DOWNLOAD = { diff --git a/lms/envs/test.py b/lms/envs/test.py index ff0946b288..c9ee4e6153 100644 --- a/lms/envs/test.py +++ b/lms/envs/test.py @@ -300,6 +300,7 @@ GIT_REPO_DIR = TEST_ROOT / "course_repos" CELERY_ALWAYS_EAGER = True CELERY_RESULT_BACKEND = 'cache' +CELERY_CACHE_BACKEND = 'memory' BROKER_TRANSPORT = 'memory' ######################### MARKETING SITE ############################### From 27223ae80f73f693859f542d9406a45f5bc70d00 Mon Sep 17 00:00:00 2001 From: Feanil Patel Date: Thu, 30 Apr 2015 17:50:18 -0400 Subject: [PATCH 04/11] Load celery for CMS as well. --- cms/__init__.py | 5 +++++ cms/celery.py | 17 +++++++++++++++++ cms/envs/test.py | 2 +- lms/envs/bok_choy.py | 1 - lms/envs/test.py | 1 - 5 files changed, 23 insertions(+), 3 deletions(-) create mode 100644 cms/celery.py diff --git a/cms/__init__.py b/cms/__init__.py index e69de29bb2..b64e43e83b 100644 --- a/cms/__init__.py +++ b/cms/__init__.py @@ -0,0 +1,5 @@ +from __future__ import absolute_import + +# This will make sure the app is always imported when +# Django starts so that shared_task will use this app. +from .celery import app as celery_app diff --git a/cms/celery.py b/cms/celery.py new file mode 100644 index 0000000000..fc8bd655bf --- /dev/null +++ b/cms/celery.py @@ -0,0 +1,17 @@ +from __future__ import absolute_import + +import os + +from celery import Celery + +from django.conf import settings + +# set the default Django settings module for the 'celery' program. +os.environ.setdefault('DJANGO_SETTINGS_MODULE', 'proj.settings') + +app = Celery('proj') + +# Using a string here means the worker will not have to +# pickle the object when using Windows. +app.config_from_object('django.conf:settings') +app.autodiscover_tasks(lambda: settings.INSTALLED_APPS) diff --git a/cms/envs/test.py b/cms/envs/test.py index 2d10aaad49..14d0d15b2c 100644 --- a/cms/envs/test.py +++ b/cms/envs/test.py @@ -188,7 +188,7 @@ simplefilter('ignore') CELERY_ALWAYS_EAGER = True CELERY_RESULT_BACKEND = 'cache' -BROKER_TRANSPORT = 'memory' +CELERY_CACHE_BACKEND = 'memory' ########################### Server Ports ################################### diff --git a/lms/envs/bok_choy.py b/lms/envs/bok_choy.py index f60ff4d089..eec91a2cb0 100644 --- a/lms/envs/bok_choy.py +++ b/lms/envs/bok_choy.py @@ -57,7 +57,6 @@ MEDIA_URL = "/static/uploads/" CELERY_ALWAYS_EAGER = True CELERY_RESULT_BACKEND = 'cache' CELERY_CACHE_BACKEND = 'memory' -#BROKER_TRANSPORT = 'memory' ###################### Grade Downloads ###################### GRADES_DOWNLOAD = { diff --git a/lms/envs/test.py b/lms/envs/test.py index c9ee4e6153..f612232c5f 100644 --- a/lms/envs/test.py +++ b/lms/envs/test.py @@ -301,7 +301,6 @@ GIT_REPO_DIR = TEST_ROOT / "course_repos" CELERY_ALWAYS_EAGER = True CELERY_RESULT_BACKEND = 'cache' CELERY_CACHE_BACKEND = 'memory' -BROKER_TRANSPORT = 'memory' ######################### MARKETING SITE ############################### From 95c240d576f4016d496a90b027329b1e809be701 Mon Sep 17 00:00:00 2001 From: Feanil Patel Date: Mon, 4 May 2015 22:13:45 -0400 Subject: [PATCH 05/11] Fix a bug in the failure increment. --- lms/djangoapps/bulk_email/tasks.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lms/djangoapps/bulk_email/tasks.py b/lms/djangoapps/bulk_email/tasks.py index 45b57d3111..6a3ce1c1a4 100644 --- a/lms/djangoapps/bulk_email/tasks.py +++ b/lms/djangoapps/bulk_email/tasks.py @@ -800,7 +800,7 @@ def _submit_for_retry(entry_id, email_id, to_list, global_email_context, current log.exception(u'Task %s: email with id %d caused send_course_email task to fail to retry. To list: %s', task_id, email_id, [i['email'] for i in to_list]) num_failed = len(to_list) - subtask_status.increment(subtask_status, failed=num_failed, state=FAILURE) + subtask_status.increment(failed=num_failed, state=FAILURE) return subtask_status, retry_exc From 3b2a750d33e29dd8543a5ebffd930031827fa6f6 Mon Sep 17 00:00:00 2001 From: Feanil Patel Date: Mon, 4 May 2015 22:16:18 -0400 Subject: [PATCH 06/11] Update the cache backend for the new version of celery and djcelery. --- lms/envs/aws.py | 3 +-- lms/envs/bok_choy.py | 3 +-- lms/envs/test.py | 3 +-- 3 files changed, 3 insertions(+), 6 deletions(-) diff --git a/lms/envs/aws.py b/lms/envs/aws.py index 45104a17c4..475050f8cb 100644 --- a/lms/envs/aws.py +++ b/lms/envs/aws.py @@ -64,8 +64,7 @@ BROKER_POOL_LIMIT = 0 BROKER_CONNECTION_TIMEOUT = 1 # For the Result Store, use the django cache named 'celery' -CELERY_RESULT_BACKEND = 'cache' -CELERY_CACHE_BACKEND = 'celery' +CELERY_RESULT_BACKEND='djcelery.backends.cache:CacheBackend' # When the broker is behind an ELB, use a heartbeat to refresh the # connection and to detect if it has been dropped. diff --git a/lms/envs/bok_choy.py b/lms/envs/bok_choy.py index eec91a2cb0..aefdd1d3d3 100644 --- a/lms/envs/bok_choy.py +++ b/lms/envs/bok_choy.py @@ -55,8 +55,7 @@ MEDIA_URL = "/static/uploads/" ################################# CELERY ###################################### CELERY_ALWAYS_EAGER = True -CELERY_RESULT_BACKEND = 'cache' -CELERY_CACHE_BACKEND = 'memory' +CELERY_RESULT_BACKEND='djcelery.backends.cache:CacheBackend' ###################### Grade Downloads ###################### GRADES_DOWNLOAD = { diff --git a/lms/envs/test.py b/lms/envs/test.py index f612232c5f..318e200d66 100644 --- a/lms/envs/test.py +++ b/lms/envs/test.py @@ -299,8 +299,7 @@ GIT_REPO_DIR = TEST_ROOT / "course_repos" ################################# CELERY ###################################### CELERY_ALWAYS_EAGER = True -CELERY_RESULT_BACKEND = 'cache' -CELERY_CACHE_BACKEND = 'memory' +CELERY_RESULT_BACKEND='djcelery.backends.cache:CacheBackend' ######################### MARKETING SITE ############################### From e4aa91d510459654a0ecee3dda999dd1a380eaed Mon Sep 17 00:00:00 2001 From: Feanil Patel Date: Wed, 6 May 2015 09:44:14 -0400 Subject: [PATCH 07/11] Remove the mock, it doesn't seem like it's needed. --- lms/djangoapps/bulk_email/tests/test_tasks.py | 10 ++-------- 1 file changed, 2 insertions(+), 8 deletions(-) diff --git a/lms/djangoapps/bulk_email/tests/test_tasks.py b/lms/djangoapps/bulk_email/tests/test_tasks.py index 759025335a..e76867f816 100644 --- a/lms/djangoapps/bulk_email/tests/test_tasks.py +++ b/lms/djangoapps/bulk_email/tests/test_tasks.py @@ -104,15 +104,9 @@ class TestBulkEmailInstructorTask(InstructorTaskCourseTestCase): return instructor_task def _run_task_with_mock_celery(self, task_class, entry_id, task_id): - """Submit a task and mock how celery provides a current_task.""" - mock_current_task = Mock() - mock_current_task.max_retries = settings.BULK_EMAIL_MAX_RETRIES - mock_current_task.default_retry_delay = settings.BULK_EMAIL_DEFAULT_RETRY_DELAY + """Mock was not needed for some tests, testing to see if it's needed at all.""" task_args = [entry_id, {}] - - with patch('bulk_email.tasks._get_current_task') as mock_get_task: - mock_get_task.return_value = mock_current_task - return task_class.apply(task_args, task_id=task_id).get() + return task_class.apply(task_args, task_id=task_id).get() def test_email_missing_current_task(self): task_entry = self._create_input_entry() From 3d7a6d8b9069a3a715ba698e297c82128d34d437 Mon Sep 17 00:00:00 2001 From: Feanil Patel Date: Wed, 6 May 2015 09:48:08 -0400 Subject: [PATCH 08/11] Fix for when celery runs in eager mode. When celery runs in eager mode, there is a bug and an exception is not thrown when using retry logic. A PR to fix the bug can be found here: https://github.com/celery/celery/pull/2607 In the mean time, we have to deal with the fact that in eager mode celery will not throw the exception but simply return it. So we raise it ourselves. --- lms/djangoapps/bulk_email/tasks.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/lms/djangoapps/bulk_email/tasks.py b/lms/djangoapps/bulk_email/tasks.py index 6a3ce1c1a4..9b12740413 100644 --- a/lms/djangoapps/bulk_email/tasks.py +++ b/lms/djangoapps/bulk_email/tasks.py @@ -773,7 +773,7 @@ def _submit_for_retry(entry_id, email_id, to_list, global_email_context, current # needs to be returned back to Celery. If it fails, we return the existing # exception. try: - send_course_email.retry( + retry_task = send_course_email.retry( args=[ entry_id, email_id, @@ -786,6 +786,7 @@ def _submit_for_retry(entry_id, email_id, to_list, global_email_context, current max_retries=max_retries, throw=True, ) + raise retry_task except RetryTaskError as retry_error: # If the retry call is successful, update with the current progress: log.exception(u'Task %s: email with id %d caused send_course_email task to retry.', From 4cc39abfa4f1d4b4bc69002a5a5c18dc0f976c90 Mon Sep 17 00:00:00 2001 From: Feanil Patel Date: Thu, 7 May 2015 17:11:24 -0400 Subject: [PATCH 09/11] Update celery config for config files I missed. --- cms/envs/aws.py | 3 +-- cms/envs/test.py | 4 +--- cms/envs/yaml_config.py | 3 +-- lms/envs/yaml_config.py | 3 +-- 4 files changed, 4 insertions(+), 9 deletions(-) diff --git a/cms/envs/aws.py b/cms/envs/aws.py index ea9b758003..bd9c8d32ee 100644 --- a/cms/envs/aws.py +++ b/cms/envs/aws.py @@ -60,8 +60,7 @@ BROKER_POOL_LIMIT = 0 BROKER_CONNECTION_TIMEOUT = 1 # For the Result Store, use the django cache named 'celery' -CELERY_RESULT_BACKEND = 'cache' -CELERY_CACHE_BACKEND = 'celery' +CELERY_RESULT_BACKEND='djcelery.backends.cache:CacheBackend' # When the broker is behind an ELB, use a heartbeat to refresh the # connection and to detect if it has been dropped. diff --git a/cms/envs/test.py b/cms/envs/test.py index 14d0d15b2c..2ed798dcb9 100644 --- a/cms/envs/test.py +++ b/cms/envs/test.py @@ -187,9 +187,7 @@ simplefilter('ignore') ################################# CELERY ###################################### CELERY_ALWAYS_EAGER = True -CELERY_RESULT_BACKEND = 'cache' -CELERY_CACHE_BACKEND = 'memory' - +CELERY_RESULT_BACKEND='djcelery.backends.cache:CacheBackend' ########################### Server Ports ################################### diff --git a/cms/envs/yaml_config.py b/cms/envs/yaml_config.py index 4fa64674bc..3cfed64391 100644 --- a/cms/envs/yaml_config.py +++ b/cms/envs/yaml_config.py @@ -75,8 +75,7 @@ BROKER_POOL_LIMIT = 0 BROKER_CONNECTION_TIMEOUT = 1 # For the Result Store, use the django cache named 'celery' -CELERY_RESULT_BACKEND = 'cache' -CELERY_CACHE_BACKEND = 'celery' +CELERY_RESULT_BACKEND='djcelery.backends.cache:CacheBackend' # When the broker is behind an ELB, use a heartbeat to refresh the # connection and to detect if it has been dropped. diff --git a/lms/envs/yaml_config.py b/lms/envs/yaml_config.py index 65a3a8090d..90aa650c8d 100644 --- a/lms/envs/yaml_config.py +++ b/lms/envs/yaml_config.py @@ -112,8 +112,7 @@ BROKER_POOL_LIMIT = 0 BROKER_CONNECTION_TIMEOUT = 1 # For the Result Store, use the django cache named 'celery' -CELERY_RESULT_BACKEND = 'cache' -CELERY_CACHE_BACKEND = 'celery' +CELERY_RESULT_BACKEND='djcelery.backends.cache:CacheBackend' # When the broker is behind an ELB, use a heartbeat to refresh the # connection and to detect if it has been dropped. From 6289b190d91f4b11e465f9974609e5815b157bd0 Mon Sep 17 00:00:00 2001 From: Feanil Patel Date: Thu, 7 May 2015 22:52:03 -0400 Subject: [PATCH 10/11] Fix pep8 and pylint. --- cms/__init__.py | 6 +++++- cms/celery.py | 12 +++++++++--- cms/envs/aws.py | 2 +- cms/envs/test.py | 2 +- cms/envs/yaml_config.py | 2 +- lms/__init__.py | 6 +++++- lms/celery.py | 12 +++++++++--- lms/envs/aws.py | 2 +- lms/envs/bok_choy.py | 2 +- lms/envs/test.py | 2 +- lms/envs/yaml_config.py | 2 +- 11 files changed, 35 insertions(+), 15 deletions(-) diff --git a/cms/__init__.py b/cms/__init__.py index b64e43e83b..7ca1196bb0 100644 --- a/cms/__init__.py +++ b/cms/__init__.py @@ -1,5 +1,9 @@ +""" +Celery needs to be loaded when the cms modules are so that task +registration and discovery can work correctly. +""" from __future__ import absolute_import # This will make sure the app is always imported when # Django starts so that shared_task will use this app. -from .celery import app as celery_app +from .celery import APP as CELERY_APP diff --git a/cms/celery.py b/cms/celery.py index fc8bd655bf..d3a44fc6d8 100644 --- a/cms/celery.py +++ b/cms/celery.py @@ -1,3 +1,9 @@ +""" +Import celery, load its settings from the django settings +and auto discover tasks in all installed django apps. + +Taken from: http://celery.readthedocs.org/en/latest/django/first-steps-with-django.html +""" from __future__ import absolute_import import os @@ -9,9 +15,9 @@ from django.conf import settings # set the default Django settings module for the 'celery' program. os.environ.setdefault('DJANGO_SETTINGS_MODULE', 'proj.settings') -app = Celery('proj') +APP = Celery('proj') # Using a string here means the worker will not have to # pickle the object when using Windows. -app.config_from_object('django.conf:settings') -app.autodiscover_tasks(lambda: settings.INSTALLED_APPS) +APP.config_from_object('django.conf:settings') +APP.autodiscover_tasks(lambda: settings.INSTALLED_APPS) diff --git a/cms/envs/aws.py b/cms/envs/aws.py index bd9c8d32ee..44b6ea2ffb 100644 --- a/cms/envs/aws.py +++ b/cms/envs/aws.py @@ -60,7 +60,7 @@ BROKER_POOL_LIMIT = 0 BROKER_CONNECTION_TIMEOUT = 1 # For the Result Store, use the django cache named 'celery' -CELERY_RESULT_BACKEND='djcelery.backends.cache:CacheBackend' +CELERY_RESULT_BACKEND = 'djcelery.backends.cache:CacheBackend' # When the broker is behind an ELB, use a heartbeat to refresh the # connection and to detect if it has been dropped. diff --git a/cms/envs/test.py b/cms/envs/test.py index 2ed798dcb9..63da126ae4 100644 --- a/cms/envs/test.py +++ b/cms/envs/test.py @@ -187,7 +187,7 @@ simplefilter('ignore') ################################# CELERY ###################################### CELERY_ALWAYS_EAGER = True -CELERY_RESULT_BACKEND='djcelery.backends.cache:CacheBackend' +CELERY_RESULT_BACKEND = 'djcelery.backends.cache:CacheBackend' ########################### Server Ports ################################### diff --git a/cms/envs/yaml_config.py b/cms/envs/yaml_config.py index 3cfed64391..bb7d532ee5 100644 --- a/cms/envs/yaml_config.py +++ b/cms/envs/yaml_config.py @@ -75,7 +75,7 @@ BROKER_POOL_LIMIT = 0 BROKER_CONNECTION_TIMEOUT = 1 # For the Result Store, use the django cache named 'celery' -CELERY_RESULT_BACKEND='djcelery.backends.cache:CacheBackend' +CELERY_RESULT_BACKEND = 'djcelery.backends.cache:CacheBackend' # When the broker is behind an ELB, use a heartbeat to refresh the # connection and to detect if it has been dropped. diff --git a/lms/__init__.py b/lms/__init__.py index b64e43e83b..7ca1196bb0 100644 --- a/lms/__init__.py +++ b/lms/__init__.py @@ -1,5 +1,9 @@ +""" +Celery needs to be loaded when the cms modules are so that task +registration and discovery can work correctly. +""" from __future__ import absolute_import # This will make sure the app is always imported when # Django starts so that shared_task will use this app. -from .celery import app as celery_app +from .celery import APP as CELERY_APP diff --git a/lms/celery.py b/lms/celery.py index fc8bd655bf..d3a44fc6d8 100644 --- a/lms/celery.py +++ b/lms/celery.py @@ -1,3 +1,9 @@ +""" +Import celery, load its settings from the django settings +and auto discover tasks in all installed django apps. + +Taken from: http://celery.readthedocs.org/en/latest/django/first-steps-with-django.html +""" from __future__ import absolute_import import os @@ -9,9 +15,9 @@ from django.conf import settings # set the default Django settings module for the 'celery' program. os.environ.setdefault('DJANGO_SETTINGS_MODULE', 'proj.settings') -app = Celery('proj') +APP = Celery('proj') # Using a string here means the worker will not have to # pickle the object when using Windows. -app.config_from_object('django.conf:settings') -app.autodiscover_tasks(lambda: settings.INSTALLED_APPS) +APP.config_from_object('django.conf:settings') +APP.autodiscover_tasks(lambda: settings.INSTALLED_APPS) diff --git a/lms/envs/aws.py b/lms/envs/aws.py index 475050f8cb..de19b68f3b 100644 --- a/lms/envs/aws.py +++ b/lms/envs/aws.py @@ -64,7 +64,7 @@ BROKER_POOL_LIMIT = 0 BROKER_CONNECTION_TIMEOUT = 1 # For the Result Store, use the django cache named 'celery' -CELERY_RESULT_BACKEND='djcelery.backends.cache:CacheBackend' +CELERY_RESULT_BACKEND = 'djcelery.backends.cache:CacheBackend' # When the broker is behind an ELB, use a heartbeat to refresh the # connection and to detect if it has been dropped. diff --git a/lms/envs/bok_choy.py b/lms/envs/bok_choy.py index aefdd1d3d3..e7efd6ca73 100644 --- a/lms/envs/bok_choy.py +++ b/lms/envs/bok_choy.py @@ -55,7 +55,7 @@ MEDIA_URL = "/static/uploads/" ################################# CELERY ###################################### CELERY_ALWAYS_EAGER = True -CELERY_RESULT_BACKEND='djcelery.backends.cache:CacheBackend' +CELERY_RESULT_BACKEND = 'djcelery.backends.cache:CacheBackend' ###################### Grade Downloads ###################### GRADES_DOWNLOAD = { diff --git a/lms/envs/test.py b/lms/envs/test.py index 318e200d66..b545a562df 100644 --- a/lms/envs/test.py +++ b/lms/envs/test.py @@ -299,7 +299,7 @@ GIT_REPO_DIR = TEST_ROOT / "course_repos" ################################# CELERY ###################################### CELERY_ALWAYS_EAGER = True -CELERY_RESULT_BACKEND='djcelery.backends.cache:CacheBackend' +CELERY_RESULT_BACKEND = 'djcelery.backends.cache:CacheBackend' ######################### MARKETING SITE ############################### diff --git a/lms/envs/yaml_config.py b/lms/envs/yaml_config.py index 90aa650c8d..328d5c07a5 100644 --- a/lms/envs/yaml_config.py +++ b/lms/envs/yaml_config.py @@ -112,7 +112,7 @@ BROKER_POOL_LIMIT = 0 BROKER_CONNECTION_TIMEOUT = 1 # For the Result Store, use the django cache named 'celery' -CELERY_RESULT_BACKEND='djcelery.backends.cache:CacheBackend' +CELERY_RESULT_BACKEND = 'djcelery.backends.cache:CacheBackend' # When the broker is behind an ELB, use a heartbeat to refresh the # connection and to detect if it has been dropped. From e0acd7151eac70b3b01df4def3521e0847178bd8 Mon Sep 17 00:00:00 2001 From: Feanil Patel Date: Fri, 8 May 2015 12:19:40 -0400 Subject: [PATCH 11/11] Update ora2 to the latest release. --- requirements/edx/github.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/requirements/edx/github.txt b/requirements/edx/github.txt index 1dc3e7b663..12b210832e 100644 --- a/requirements/edx/github.txt +++ b/requirements/edx/github.txt @@ -34,7 +34,7 @@ git+https://github.com/pmitros/pyfs.git@96e1922348bfe6d99201b9512a9ed946c87b7e0b -e git+https://github.com/edx/bok-choy.git@82d2f4b72e807b10d112179c0a4abd810a001b82#egg=bok_choy -e git+https://github.com/edx-solutions/django-splash.git@7579d052afcf474ece1239153cffe1c89935bc4f#egg=django-splash -e git+https://github.com/edx/acid-block.git@e46f9cda8a03e121a00c7e347084d142d22ebfb7#egg=acid-xblock --e git+https://github.com/edx/edx-ora2.git@feanil/update_celery#egg=edx-ora2 +-e git+https://github.com/edx/edx-ora2.git@release-2015-05-08T16.15#egg=edx-ora2 -e git+https://github.com/edx/edx-submissions.git@e2361932b9bce061a018a31bb3929e9cade80f49#egg=edx-submissions -e git+https://github.com/edx/opaque-keys.git@1254ed4d615a428591850656f39f26509b86d30a#egg=opaque-keys -e git+https://github.com/edx/ease.git@c6dee053eae6b3ac4fdf6be11fa7a9f8265540aa#egg=ease