From c74584f63c9c655c01ac780f5e8e77048d0e4080 Mon Sep 17 00:00:00 2001 From: jiangweidong Date: Tue, 1 Nov 2022 16:53:44 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20Redis=20Sentinel=E5=8F=82=E6=95=B0?= =?UTF-8?q?=E7=B1=BB=E5=9E=8B=E9=97=AE=E9=A2=98=EF=BC=8C=E5=AF=BC=E8=87=B4?= =?UTF-8?q?=E6=8A=A5=E9=94=99?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- apps/jumpserver/settings/base.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/apps/jumpserver/settings/base.py b/apps/jumpserver/settings/base.py index 4b2d74a41..acfb7637e 100644 --- a/apps/jumpserver/settings/base.py +++ b/apps/jumpserver/settings/base.py @@ -291,7 +291,10 @@ REDIS_PROTOCOL = 'rediss' if REDIS_USE_SSL else 'redis' REDIS_SENTINELS_HOST = CONFIG.REDIS_SENTINELS_HOST REDIS_SENTINEL_SERVICE_NAME, REDIS_SENTINELS = parse_sentinels_host(REDIS_SENTINELS_HOST) REDIS_SENTINEL_PASSWORD = CONFIG.REDIS_SENTINEL_PASSWORD -REDIS_SENTINEL_SOCKET_TIMEOUT = CONFIG.REDIS_SENTINEL_SOCKET_TIMEOUT +if CONFIG.REDIS_SENTINEL_SOCKET_TIMEOUT: + REDIS_SENTINEL_SOCKET_TIMEOUT = int(CONFIG.REDIS_SENTINEL_SOCKET_TIMEOUT) +else: + REDIS_SENTINEL_SOCKET_TIMEOUT = None # Cache config REDIS_OPTIONS = {