mirror of
https://github.com/cookiecutter/cookiecutter-django.git
synced 2025-08-09 06:24:52 +03:00
Set a default value for CELERY_BROKER_URL when docker usn't used - fixes #1741
This commit is contained in:
parent
36f3558ccc
commit
03636a9dbe
|
@ -233,7 +233,12 @@ if USE_TZ:
|
|||
# http://docs.celeryproject.org/en/latest/userguide/configuration.html#std:setting-timezone
|
||||
CELERY_TIMEZONE = TIME_ZONE
|
||||
# http://docs.celeryproject.org/en/latest/userguide/configuration.html#std:setting-broker_url
|
||||
{% if cookiecutter.use_docker == 'y' -%}
|
||||
CELERY_BROKER_URL = env('CELERY_BROKER_URL')
|
||||
{%- else %}
|
||||
CELERY_BROKER_URL = env('CELERY_BROKER_URL', default="redis://localhost:6379")
|
||||
{%- endif %}
|
||||
|
||||
# http://docs.celeryproject.org/en/latest/userguide/configuration.html#std:setting-result_backend
|
||||
CELERY_RESULT_BACKEND = CELERY_BROKER_URL
|
||||
# http://docs.celeryproject.org/en/latest/userguide/configuration.html#std:setting-accept_content
|
||||
|
|
Loading…
Reference in New Issue
Block a user