MCPcopy
hub / github.com/redis/redis-py / _split_multi_shard_command

Method _split_multi_shard_command

redis/cluster.py:1082–1097  ·  view source on GitHub ↗

Splits the command with Multi-Shard policy, to the multiple commands

(self, *args, **kwargs)

Source from the content-addressed store, hash-verified

1080 return [node]
1081
1082 def _split_multi_shard_command(self, *args, **kwargs) -> list[dict]:
1083 """
1084 Splits the command with Multi-Shard policy, to the multiple commands
1085 """
1086 keys = self._get_command_keys(*args)
1087 commands = []
1088
1089 for key in keys:
1090 commands.append(
1091 {
1092 "args": (args[0], key),
1093 "kwargs": kwargs,
1094 }
1095 )
1096
1097 return commands
1098
1099 def get_special_nodes(self) -> Optional[list["ClusterNode"]]:
1100 """

Callers 2

__init__Method · 0.95
__init__Method · 0.80

Calls 2

_get_command_keysMethod · 0.95
appendMethod · 0.45

Tested by

no test coverage detected