|
|
@ -82,7 +82,6 @@ BOOTSTRAP3 = { |
|
|
|
# Django channels support websocket |
|
|
|
# Django channels support websocket |
|
|
|
REDIS_LAYERS_HOST = { |
|
|
|
REDIS_LAYERS_HOST = { |
|
|
|
'db': CONFIG.REDIS_DB_WS, |
|
|
|
'db': CONFIG.REDIS_DB_WS, |
|
|
|
'password': CONFIG.REDIS_PASSWORD or None, |
|
|
|
|
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
REDIS_LAYERS_SSL_PARAMS = {} |
|
|
|
REDIS_LAYERS_SSL_PARAMS = {} |
|
|
@ -97,6 +96,7 @@ if REDIS_USE_SSL: |
|
|
|
|
|
|
|
|
|
|
|
if REDIS_SENTINEL_SERVICE_NAME and REDIS_SENTINELS: |
|
|
|
if REDIS_SENTINEL_SERVICE_NAME and REDIS_SENTINELS: |
|
|
|
REDIS_LAYERS_HOST['sentinels'] = REDIS_SENTINELS |
|
|
|
REDIS_LAYERS_HOST['sentinels'] = REDIS_SENTINELS |
|
|
|
|
|
|
|
REDIS_LAYERS_HOST['password'] = CONFIG.REDIS_PASSWORD or None |
|
|
|
REDIS_LAYERS_HOST['master_name'] = REDIS_SENTINEL_SERVICE_NAME |
|
|
|
REDIS_LAYERS_HOST['master_name'] = REDIS_SENTINEL_SERVICE_NAME |
|
|
|
REDIS_LAYERS_HOST['sentinel_kwargs'] = { |
|
|
|
REDIS_LAYERS_HOST['sentinel_kwargs'] = { |
|
|
|
'password': REDIS_SENTINEL_PASSWORD, |
|
|
|
'password': REDIS_SENTINEL_PASSWORD, |
|
|
@ -111,7 +111,7 @@ else: |
|
|
|
# More info see: https://github.com/django/channels_redis/issues/334 |
|
|
|
# More info see: https://github.com/django/channels_redis/issues/334 |
|
|
|
# REDIS_LAYERS_HOST['address'] = (CONFIG.REDIS_HOST, CONFIG.REDIS_PORT) |
|
|
|
# REDIS_LAYERS_HOST['address'] = (CONFIG.REDIS_HOST, CONFIG.REDIS_PORT) |
|
|
|
REDIS_LAYERS_ADDRESS = '{protocol}://:{password}@{host}:{port}/{db}'.format( |
|
|
|
REDIS_LAYERS_ADDRESS = '{protocol}://:{password}@{host}:{port}/{db}'.format( |
|
|
|
protocol=REDIS_PROTOCOL, password=CONFIG.REDIS_PASSWORD, |
|
|
|
protocol=REDIS_PROTOCOL, password=CONFIG.REDIS_PASSWORD_QUOTE, |
|
|
|
host=CONFIG.REDIS_HOST, port=CONFIG.REDIS_PORT, db=CONFIG.REDIS_DB_WS |
|
|
|
host=CONFIG.REDIS_HOST, port=CONFIG.REDIS_PORT, db=CONFIG.REDIS_DB_WS |
|
|
|
) |
|
|
|
) |
|
|
|
REDIS_LAYERS_HOST['address'] = REDIS_LAYERS_ADDRESS |
|
|
|
REDIS_LAYERS_HOST['address'] = REDIS_LAYERS_ADDRESS |
|
|
@ -153,7 +153,7 @@ if REDIS_SENTINEL_SERVICE_NAME and REDIS_SENTINELS: |
|
|
|
else: |
|
|
|
else: |
|
|
|
CELERY_BROKER_URL = CELERY_BROKER_URL_FORMAT % { |
|
|
|
CELERY_BROKER_URL = CELERY_BROKER_URL_FORMAT % { |
|
|
|
'protocol': REDIS_PROTOCOL, |
|
|
|
'protocol': REDIS_PROTOCOL, |
|
|
|
'password': CONFIG.REDIS_PASSWORD, |
|
|
|
'password': CONFIG.REDIS_PASSWORD_QUOTE, |
|
|
|
'host': CONFIG.REDIS_HOST, |
|
|
|
'host': CONFIG.REDIS_HOST, |
|
|
|
'port': CONFIG.REDIS_PORT, |
|
|
|
'port': CONFIG.REDIS_PORT, |
|
|
|
'db': CONFIG.REDIS_DB_CELERY, |
|
|
|
'db': CONFIG.REDIS_DB_CELERY, |
|
|
@ -187,6 +187,7 @@ ANSIBLE_LOG_DIR = os.path.join(PROJECT_DIR, 'data', 'ansible') |
|
|
|
REDIS_HOST = CONFIG.REDIS_HOST |
|
|
|
REDIS_HOST = CONFIG.REDIS_HOST |
|
|
|
REDIS_PORT = CONFIG.REDIS_PORT |
|
|
|
REDIS_PORT = CONFIG.REDIS_PORT |
|
|
|
REDIS_PASSWORD = CONFIG.REDIS_PASSWORD |
|
|
|
REDIS_PASSWORD = CONFIG.REDIS_PASSWORD |
|
|
|
|
|
|
|
REDIS_PASSWORD_QUOTE = CONFIG.REDIS_PASSWORD_QUOTE |
|
|
|
|
|
|
|
|
|
|
|
DJANGO_REDIS_SCAN_ITERSIZE = 1000 |
|
|
|
DJANGO_REDIS_SCAN_ITERSIZE = 1000 |
|
|
|
|
|
|
|
|
|
|
|