diff options
author | dvora-h <67596500+dvora-h@users.noreply.github.com> | 2022-03-14 13:43:36 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-03-14 13:43:36 +0200 |
commit | 5d5f8923e48f7fe2d30959db50cc9bcfc953578b (patch) | |
tree | 5655c97f8c5c5f793794a54ba9bb89a9b8e4f087 /redis/commands/cluster.py | |
parent | 9376ed82cd8b8296f5585eb96d137e54b56d723d (diff) | |
download | redis-py-5d5f8923e48f7fe2d30959db50cc9bcfc953578b.tar.gz |
Add support for CLUSTER DELSLOTSRANGE (#2018)
* delslotsrange
* test
* linters
* skip test
* linters
Diffstat (limited to 'redis/commands/cluster.py')
-rw-r--r-- | redis/commands/cluster.py | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/redis/commands/cluster.py b/redis/commands/cluster.py index 3d42317..4182726 100644 --- a/redis/commands/cluster.py +++ b/redis/commands/cluster.py @@ -287,6 +287,17 @@ class RedisClusterCommands( """ return [self.execute_command("CLUSTER DELSLOTS", slot) for slot in slots] + def cluster_delslotsrange(self, *slots): + """ + Similar to the CLUSTER DELSLOTS command. + The difference is that CLUSTER DELSLOTS takes a list of hash slots to remove + from the node, while CLUSTER DELSLOTSRANGE takes a list of slot ranges to remove + from the node. + + For more information check https://redis.io/commands/cluster-delslotsrange + """ + return self.execute_command("CLUSTER DELSLOTSRANGE", *slots) + def cluster_failover(self, target_node, option=None): """ Forces a slave to perform a manual failover of its master |