From 72c2290300f3279aea02505d72554c01f7a7ee50 Mon Sep 17 00:00:00 2001 From: tonygatescxp Date: Mon, 17 Jul 2017 17:18:14 +0800 Subject: [PATCH] Update settings.py (#515) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 修正Redis连接字符串 --- apps/jumpserver/settings.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/apps/jumpserver/settings.py b/apps/jumpserver/settings.py index 6c8833517..2869bf7ed 100644 --- a/apps/jumpserver/settings.py +++ b/apps/jumpserver/settings.py @@ -315,7 +315,7 @@ AUTH_LDAP_USER_ATTR_MAP = CONFIG.AUTH_LDAP_USER_ATTR_MAP # Celery using redis as broker -BROKER_URL = 'redis://%(password)s%(host)s:%(port)s/3' % { +BROKER_URL = 'redis://:%(password)s@%(host)s:%(port)s/3' % { 'password': CONFIG.REDIS_PASSWORD + ':' if CONFIG.REDIS_PASSWORD else '', 'host': CONFIG.REDIS_HOST or '127.0.0.1', 'port': CONFIG.REDIS_PORT or 6379, @@ -339,7 +339,7 @@ CELERY_RESULT_BACKEND = BROKER_URL CACHES = { 'default': { 'BACKEND': 'redis_cache.RedisCache', - 'LOCATION': 'redis://%(password)s%(host)s:%(port)s/4' % { + 'LOCATION': 'redis://:%(password)s@%(host)s:%(port)s/4' % { 'password': CONFIG.REDIS_PASSWORD + '@' if CONFIG.REDIS_PASSWORD else '', 'host': CONFIG.REDIS_HOST or '127.0.0.1', 'port': CONFIG.REDIS_PORT or 6379, @@ -364,4 +364,4 @@ BOOTSTRAP3 = { 'horizontal_field_class': 'col-md-9', # Set placeholder attributes to label if no placeholder is provided 'set_placeholder': True, -} \ No newline at end of file +}