fix: 解决beat无法在redis-ssl下运行报错的问题 (#12893)

Co-authored-by: jiangweidong <weidong.jiang@fit2cloud.com>
pull/12896/head
fit2bot 8 months ago committed by GitHub
parent bca0863952
commit 3336a4526b
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

@ -48,7 +48,7 @@ if REDIS_SENTINEL_SERVICE_NAME and REDIS_SENTINELS:
) )
redis_client = sentinel_client.master_for(REDIS_SENTINEL_SERVICE_NAME) redis_client = sentinel_client.master_for(REDIS_SENTINEL_SERVICE_NAME)
else: else:
REDIS_PROTOCOL = 'rediss' if settings.REDIS_USE_SSL else 'redis' REDIS_PROTOCOL = 'rediss' if connection_params.pop('ssl', False) else 'redis'
REDIS_LOCATION_NO_DB = '%(protocol)s://:%(password)s@%(host)s:%(port)s' % { REDIS_LOCATION_NO_DB = '%(protocol)s://:%(password)s@%(host)s:%(port)s' % {
'protocol': REDIS_PROTOCOL, 'protocol': REDIS_PROTOCOL,
'password': settings.REDIS_PASSWORD_QUOTE, 'password': settings.REDIS_PASSWORD_QUOTE,

Loading…
Cancel
Save