From b1e7f55b6bb7b18cfdcb4e7abcec5489fe5b4d1a Mon Sep 17 00:00:00 2001 From: Daniel Roy Greenfeld Date: Thu, 14 Jul 2016 12:06:29 -0700 Subject: [PATCH] Update common.py --- {{cookiecutter.project_slug}}/config/settings/common.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/{{cookiecutter.project_slug}}/config/settings/common.py b/{{cookiecutter.project_slug}}/config/settings/common.py index 898e60ef9..b25993f4d 100644 --- a/{{cookiecutter.project_slug}}/config/settings/common.py +++ b/{{cookiecutter.project_slug}}/config/settings/common.py @@ -231,6 +231,10 @@ INSTALLED_APPS += ('{{cookiecutter.project_slug}}.taskapp.celery.CeleryConfig',) # if you are not using the django database broker (e.g. rabbitmq, redis, memcached), you can remove the next line. INSTALLED_APPS += ('kombu.transport.django',) BROKER_URL = env('CELERY_BROKER_URL', default='django://') +if BROKER_URL == 'django://': + CELERY_RESULT_BACKEND = 'redis://' +else: + CELERY_RESULT_BACKEND = BROKER_URL ########## END CELERY {% endif %}