mirror of
https://github.com/cookiecutter/cookiecutter-django.git
synced 2025-07-11 00:22:29 +03:00
Update common.py
This commit is contained in:
parent
baa1b326f3
commit
b1e7f55b6b
|
@ -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.
|
# 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',)
|
INSTALLED_APPS += ('kombu.transport.django',)
|
||||||
BROKER_URL = env('CELERY_BROKER_URL', default='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
|
########## END CELERY
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue
Block a user