File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 66import os .path
77import tempfile
88
9-
109PROJECT_ROOT = os .path .normpath (os .path .join (os .path .dirname (__file__ ), '..' ))
1110
1211DEBUG = False
150149 'allauth.account' ,
151150 'guardian' ,
152151 'json_field' ,
152+ 'gunicorn' ,
153153 'rest_framework' ,
154154 'south' ,
155155 # Deis apps
263263}
264264TEST_RUNNER = 'api.tests.SilentDjangoTestSuiteRunner'
265265
266-
267- # celery task execution settings
268- BROKER_URL = 'amqp://guest:guest@localhost:5672/'
266+ # celery settings
269267CELERY_ACCEPT_CONTENT = ['pickle' , 'json' ]
270268CELERY_IMPORTS = ('api.tasks' ,)
271- CELERY_RESULT_BACKEND = 'amqp'
272-
273- # hardcode celeryd concurrency
269+ BROKER_URL = 'redis://{}:{}/{}' .format (
270+ os .environ .get ('CACHE_HOST' , '127.0.0.1' ),
271+ os .environ .get ('CACHE_PORT' , 6379 ),
272+ os .environ .get ('CACHE_NAME' , 0 ))
273+ CELERY_RESULT_BACKEND = BROKER_URL
274274# this number should be equal to N+1, where
275275# N is number of nodes in largest formation
276276CELERYD_CONCURRENCY = 8
310310# should also be used for any settings which differ between development
311311# and production.
312312# The local_settings.py file should *not* be checked in to version control.
313-
314313try :
315314 from .local_settings import * # @UnusedWildImport # noqa
316315except ImportError :
You can’t perform that action at this time.
0 commit comments