Load celery for CMS as well.

This commit is contained in:
Feanil Patel
2015-04-30 17:50:18 -04:00
parent 34df5a32d2
commit 27223ae80f
5 changed files with 23 additions and 3 deletions

View File

@@ -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

17
cms/celery.py Normal file
View File

@@ -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)

View File

@@ -188,7 +188,7 @@ simplefilter('ignore')
CELERY_ALWAYS_EAGER = True
CELERY_RESULT_BACKEND = 'cache'
BROKER_TRANSPORT = 'memory'
CELERY_CACHE_BACKEND = 'memory'
########################### Server Ports ###################################

View File

@@ -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 = {

View File

@@ -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 ###############################