Skip to content

Commit 191ed5d

Browse files
committed
Return only one node on get_node_by_slot
1 parent 94914ae commit 191ed5d

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

baseplate/clients/redis_cluster.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,8 +27,8 @@ def get_node_by_slot(self, slot: int, read_command: bool = False) -> Dict[str, A
2727
if read_command:
2828
return random.choice(self.nodes.slots[slot])
2929

30-
# This isn't a read command, so return the primary
31-
return self.nodes.slots[slot]
30+
# This isn't a read command, so return the primary (first node)
31+
return self.nodes.slots[slot][0]
3232

3333

3434
def cluster_pool_from_config(

0 commit comments

Comments
 (0)