From 5d5f8923e48f7fe2d30959db50cc9bcfc953578b Mon Sep 17 00:00:00 2001 From: dvora-h <67596500+dvora-h@users.noreply.github.com> Date: Mon, 14 Mar 2022 13:43:36 +0200 Subject: Add support for CLUSTER DELSLOTSRANGE (#2018) * delslotsrange * test * linters * skip test * linters --- redis/commands/cluster.py | 11 +++++++++++ 1 file changed, 11 insertions(+) (limited to 'redis/commands/cluster.py') 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 -- cgit v1.2.1