mirror of
https://github.com/bunkerity/bunkerweb
synced 2026-05-24 09:28:37 +00:00
Update Redis sentinel host parsing to handle missing port numbers
This commit is contained in:
parent
b74df3e719
commit
31addcfb4e
2 changed files with 2 additions and 2 deletions
|
|
@ -115,7 +115,7 @@ class CLI(ApiCaller):
|
|||
sentinel_hosts = self.__get_variable("REDIS_SENTINEL_HOSTS", [])
|
||||
|
||||
if isinstance(sentinel_hosts, str):
|
||||
sentinel_hosts = [host.split(":") if ":" in host else host for host in sentinel_hosts.split(" ") if host]
|
||||
sentinel_hosts = [host.split(":") if ":" in host else (host, "26379") for host in sentinel_hosts.split(" ") if host]
|
||||
|
||||
if sentinel_hosts:
|
||||
sentinel_username = self.__get_variable("REDIS_SENTINEL_USERNAME", None) or None
|
||||
|
|
|
|||
|
|
@ -2151,7 +2151,7 @@ def bans():
|
|||
sentinel_hosts = db_config.get("REDIS_SENTINEL_HOSTS", [])
|
||||
|
||||
if isinstance(sentinel_hosts, str):
|
||||
sentinel_hosts = [host.split(":") if ":" in host else host for host in sentinel_hosts.split(" ") if host]
|
||||
sentinel_hosts = [host.split(":") if ":" in host else (host, "26379") for host in sentinel_hosts.split(" ") if host]
|
||||
|
||||
if sentinel_hosts:
|
||||
sentinel_username = db_config.get("REDIS_SENTINEL_USERNAME", None) or None
|
||||
|
|
|
|||
Loading…
Reference in a new issue