mirror of
https://github.com/cookiecutter/cookiecutter-django.git
synced 2025-08-09 14:34:53 +03:00
CELERY_RESULT_BACKEND = CELERY_BROKER_URL always
This commit is contained in:
parent
65b150fcfe
commit
231ad4ef15
|
@ -230,12 +230,9 @@ MANAGERS = ADMINS
|
|||
# ------------------------------------------------------------------------------
|
||||
INSTALLED_APPS += ['{{cookiecutter.project_slug}}.taskapp.celery.CeleryAppConfig']
|
||||
# http://docs.celeryproject.org/en/latest/userguide/configuration.html#std:setting-broker_url
|
||||
CELERY_BROKER_URL = env('CELERY_BROKER_URL', default='django://')
|
||||
CELERY_BROKER_URL = env('CELERY_BROKER_URL')
|
||||
# http://docs.celeryproject.org/en/latest/userguide/configuration.html#std:setting-result_backend
|
||||
if CELERY_BROKER_URL == 'django://':
|
||||
CELERY_RESULT_BACKEND = 'redis://'
|
||||
else:
|
||||
CELERY_RESULT_BACKEND = CELERY_BROKER_URL
|
||||
CELERY_RESULT_BACKEND = CELERY_BROKER_URL
|
||||
# http://docs.celeryproject.org/en/latest/userguide/configuration.html#std:setting-accept_content
|
||||
CELERY_ACCEPT_CONTENT = ['json']
|
||||
# http://docs.celeryproject.org/en/latest/userguide/configuration.html#std:setting-task_serializer
|
||||
|
|
Loading…
Reference in New Issue
Block a user