mirror of
https://github.com/open-webui/open-webui.git
synced 2026-12-05 19:17:56 -05:00
refac
This commit is contained in:
1 parent
a658799f98
commit
d13ecf6816
3 files changed
+34
-6
No files matched your search
@@ -136,6 +136,12 @@ class RedisDict:
|
||||
if cursor == 0:
|
||||
break
|
||||
|
||||
def get_many(self, *keys):
|
||||
"""Values of fields in one HMGET, None where missing; no keys returns [] (HMGET rejects an empty field list)."""
|
||||
if not keys:
|
||||
return []
|
||||
return [JSONCodec.loads(v) if v is not None else None for v in self.redis.hmget(self.name, keys)]
|
||||
|
||||
def delete_many(self, *keys):
|
||||
"""Delete fields in one HDEL; no keys is a no-op (HDEL rejects an empty field list)."""
|
||||
if keys:
|
||||
|
||||
Reference in new issue
Block a user