summaryrefslogtreecommitdiff
path: root/redis/commands/parser.py
diff options
context:
space:
mode:
authordvora-h <67596500+dvora-h@users.noreply.github.com>2022-03-06 13:49:13 +0200
committerGitHub <noreply@github.com>2022-03-06 13:49:13 +0200
commit98fd06eb8df1ecc109b4a5fb2d2a2e810142283e (patch)
tree0aec0ea9d1b87637381fbd06f7e93848ddc43433 /redis/commands/parser.py
parentc5d19b8571d2b15a29637f56a51b0da560072945 (diff)
downloadredis-py-98fd06eb8df1ecc109b4a5fb2d2a2e810142283e.tar.gz
Add support for JSON, TIMESERIES, BLOOM & GRAPH commands in cluster (#2032)
Co-authored-by: Chayim <chayim@users.noreply.github.com>
Diffstat (limited to 'redis/commands/parser.py')
-rw-r--r--redis/commands/parser.py9
1 files changed, 8 insertions, 1 deletions
diff --git a/redis/commands/parser.py b/redis/commands/parser.py
index 2bb0576..89292ab 100644
--- a/redis/commands/parser.py
+++ b/redis/commands/parser.py
@@ -17,7 +17,14 @@ class CommandsParser:
self.initialize(redis_connection)
def initialize(self, r):
- self.commands = r.execute_command("COMMAND")
+ commands = r.execute_command("COMMAND")
+ uppercase_commands = []
+ for cmd in commands:
+ if any(x.isupper() for x in cmd):
+ uppercase_commands.append(cmd)
+ for cmd in uppercase_commands:
+ commands[cmd.lower()] = commands.pop(cmd)
+ self.commands = commands
# As soon as this PR is merged into Redis, we should reimplement
# our logic to use COMMAND INFO changes to determine the key positions