Skip to content

Commit 35da8ab

Browse files
committed
Changed ref type
1 parent ea3826f commit 35da8ab

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

redis/cluster.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2149,6 +2149,7 @@ def __init__(
21492149
**kwargs,
21502150
):
21512151
""" """
2152+
self.command_stack = []
21522153
self.nodes_manager = nodes_manager
21532154
self.commands_parser = commands_parser
21542155
self.refresh_table_asap = False
@@ -2182,7 +2183,6 @@ def __init__(
21822183
self._execution_strategy: ExecutionStrategy = (
21832184
PipelineStrategy(self) if not transaction else TransactionStrategy(self)
21842185
)
2185-
self.command_stack = self._execution_strategy._command_queue
21862186

21872187
def __repr__(self):
21882188
""" """
@@ -2204,7 +2204,7 @@ def __del__(self):
22042204

22052205
def __len__(self):
22062206
""" """
2207-
return len(self.command_stack)
2207+
return len(self._execution_strategy.command_queue)
22082208

22092209
def __bool__(self):
22102210
"Pipeline instances should always evaluate to True on Python 3+"

0 commit comments

Comments
 (0)