Skip to content

Commit b2858fe

Browse files
author
Gabriel Monroy
committed
switch from rabbitmq to redis, install gunicorn app for run_gunicorn support
1 parent 5af0968 commit b2858fe

1 file changed

Lines changed: 7 additions & 8 deletions

File tree

deis/settings.py

Lines changed: 7 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,6 @@
66
import os.path
77
import tempfile
88

9-
109
PROJECT_ROOT = os.path.normpath(os.path.join(os.path.dirname(__file__), '..'))
1110

1211
DEBUG = False
@@ -150,6 +149,7 @@
150149
'allauth.account',
151150
'guardian',
152151
'json_field',
152+
'gunicorn',
153153
'rest_framework',
154154
'south',
155155
# Deis apps
@@ -263,14 +263,14 @@
263263
}
264264
TEST_RUNNER = 'api.tests.SilentDjangoTestSuiteRunner'
265265

266-
267-
# celery task execution settings
268-
BROKER_URL = 'amqp://guest:guest@localhost:5672/'
266+
# celery settings
269267
CELERY_ACCEPT_CONTENT = ['pickle', 'json']
270268
CELERY_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
276276
CELERYD_CONCURRENCY = 8
@@ -310,7 +310,6 @@
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-
314313
try:
315314
from .local_settings import * # @UnusedWildImport # noqa
316315
except ImportError:

0 commit comments

Comments
 (0)