Commit a6245d0f authored by Johan Bloemberg's avatar Johan Bloemberg

Fix celery reading settings from django settings.py.

parent da10ae73
......@@ -11,7 +11,7 @@ from django.conf import settings
os.environ.setdefault("DJANGO_SETTINGS_MODULE", "failmap_admin.settings")
app = Celery(__name__)
app.config_from_object('django.conf:settings')
app.config_from_object('django.conf:settings', namespace='CELERY')
# autodiscover all celery tasks in tasks.py files inside failmap_admin modules
appname = __name__.split('.', 1)[0]
app.autodiscover_tasks([app for app in settings.INSTALLED_APPS if app.startswith(appname)])
......
......@@ -420,8 +420,8 @@ COMPRESS_OFFLINE = not DEBUG
# Enabled when debug is off by default.
# Celery config
BROKER_URL = os.environ.get('BROKER', 'redis://localhost:6379/0')
CELERY_RESULT_BACKEND = os.environ.get('RESULT_BACKEND', BROKER_URL.replace('amqp://', 'rpc://'))
CELERY_BROKER_URL = os.environ.get('BROKER', 'redis://localhost:6379/0')
CELERY_RESULT_BACKEND = os.environ.get('RESULT_BACKEND', CELERY_BROKER_URL.replace('amqp://', 'rpc://'))
ENABLE_UTC = True
# Any data transfered with pickle needs to be over tls... you can inject arbitrary objects with
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment