Skip to content

Commit

Permalink
- minor tweak on settings for Docker
Browse files Browse the repository at this point in the history
  • Loading branch information
afabiani committed May 10, 2018
1 parent ac173fc commit 3817742
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 4 deletions.
11 changes: 7 additions & 4 deletions geonode/settings.py
Original file line number Diff line number Diff line change
Expand Up @@ -1256,17 +1256,20 @@
'visibility_timeout': 86400
}

ASYNC_SIGNALS = False
ASYNC_SIGNALS = os.environ.get('ASYNC_SIGNALS', False)
RABBITMQ_SIGNALS_BROKER_URL = 'amqp://localhost:5672'
REDIS_SIGNALS_BROKER_URL = 'redis://localhost:6379/0'
LOCAL_SIGNALS_BROKER_URL = 'memory://'

if ASYNC_SIGNALS:
_BROKER_URL = RABBITMQ_SIGNALS_BROKER_URL
# _BROKER_URL = REDIS_SIGNALS_BROKER_URL
_BROKER_URL = os.environ.get('BROKER_URL', RABBITMQ_SIGNALS_BROKER_URL)
# _BROKER_URL = = os.environ.get('BROKER_URL', REDIS_SIGNALS_BROKER_URL)

CELERY_RESULT_BACKEND = _BROKER_URL
else:
_BROKER_URL = LOCAL_SIGNALS_BROKER_URL
BROKER_URL = os.environ.get('BROKER_URL', _BROKER_URL)

BROKER_URL = _BROKER_URL

CELERY_RESULT_PERSISTENT = False

Expand Down
1 change: 1 addition & 0 deletions scripts/docker/env/production/django.env
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ GEONODE_DATABASE=geonode
GEONODE_DATABASE_PASSWORD=geonode
GEONODE_GEODATABASE=geonode_data
GEONODE_GEODATABASE_PASSWORD=geonode_data
ASYNC_SIGNALS=True
BROKER_URL=amqp://guest:guest@rabbitmq:5672/
DJANGO_SETTINGS_MODULE=geonode.settings
ALLOWED_HOSTS=['django',]
Expand Down

0 comments on commit 3817742

Please sign in to comment.