v1.8.66: fix 7 Redis bugs — shlex parser, GUI stats, SSL, error handling, dedup

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
chrome-storm-c442
2026-02-28 07:11:28 -05:00
parent 7c9e54bb44
commit 997c7d20a5
9 changed files with 841 additions and 56 deletions

View File

@@ -23,6 +23,7 @@ class RedisClient:
self._port = int(server.get("port", 6379))
self._password = server.get("password") or None
self._db = int(server.get("db_index", 0))
self._ssl = server.get("ssl", False) or server.get("use_ssl", False)
self._conn = None
# -- lifecycle --------------------------------------------------------
@@ -38,6 +39,7 @@ class RedisClient:
decode_responses=True,
socket_timeout=5,
socket_connect_timeout=5,
ssl=self._ssl,
)
self._conn.ping()
log.info("Redis connected %s:%s db=%s", self._host, self._port, self._db)
@@ -75,7 +77,11 @@ class RedisClient:
"""Parse a raw command string, execute via redis-py, return formatted."""
if not self._conn:
return "[not connected]"
parts = command.split()
import shlex
try:
parts = shlex.split(command)
except ValueError:
parts = command.split() # fallback для незакрытых кавычек
if not parts:
return ""
try: