Update common.py

This commit is contained in:
Daniel Roy Greenfeld 2016-07-14 12:06:29 -07:00 committed by GitHub
parent baa1b326f3
commit b1e7f55b6b

View File

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