root: fix redis username in lifecycle (#9158)

Signed-off-by: Yeechan Lu <git@orzfly.com>
This commit is contained in:
Yeechan Lu
2024-04-08 02:05:46 +08:00
committed by GitHub
parent fcf752905b
commit 54b951d3cc

View File

@ -39,8 +39,10 @@ def check_redis():
if CONFIG.get_bool("redis.tls", False):
REDIS_PROTOCOL_PREFIX = "rediss://"
REDIS_URL = (
f"{REDIS_PROTOCOL_PREFIX}:"
f"{quote_plus(CONFIG.get('redis.password'))}@{quote_plus(CONFIG.get('redis.host'))}:"
f"{REDIS_PROTOCOL_PREFIX}"
f"{quote_plus(CONFIG.get('redis.username'))}:"
f"{quote_plus(CONFIG.get('redis.password'))}@"
f"{quote_plus(CONFIG.get('redis.host'))}:"
f"{CONFIG.get_int('redis.port')}/{CONFIG.get('redis.db')}"
)
while True: