Skip to content

Commit bfe06d5

Browse files
committed
Fixed variables access
1 parent c0f4372 commit bfe06d5

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

redis/asyncio/cluster.py

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1571,31 +1571,31 @@ def __init__(
15711571
async def initialize(self) -> "ClusterPipeline":
15721572
if self.cluster_client._initialize:
15731573
await self.cluster_client.initialize()
1574-
self._execution_strategy._command_stack = []
1574+
self._execution_strategy._command_queue = []
15751575
return self
15761576

15771577
async def __aenter__(self) -> "ClusterPipeline":
15781578
return await self.initialize()
15791579

15801580
async def __aexit__(self, exc_type: None, exc_value: None, traceback: None) -> None:
1581-
self._execution_strategy._command_stack = []
1581+
self._execution_strategy._command_queue = []
15821582

15831583
def __await__(self) -> Generator[Any, None, "ClusterPipeline"]:
15841584
return self.initialize().__await__()
15851585

15861586
def __enter__(self) -> "ClusterPipeline":
1587-
self._execution_strategy._command_stack = []
1587+
self._execution_strategy._command_queue = []
15881588
return self
15891589

15901590
def __exit__(self, exc_type: None, exc_value: None, traceback: None) -> None:
1591-
self._execution_strategy._command_stack = []
1591+
self._execution_strategy._command_queue = []
15921592

15931593
def __bool__(self) -> bool:
15941594
"Pipeline instances should always evaluate to True on Python 3+"
15951595
return True
15961596

15971597
def __len__(self) -> int:
1598-
return len(self._execution_strategy._command_stack)
1598+
return len(self._execution_strategy._command_queue)
15991599

16001600
def execute_command(
16011601
self, *args: Union[KeyT, EncodableT], **kwargs: Any
@@ -1931,7 +1931,7 @@ async def execute(
19311931
# All other errors should be raised.
19321932
raise e
19331933
finally:
1934-
self._command_stack = []
1934+
self._command_queue = []
19351935

19361936
async def _execute(
19371937
self,

0 commit comments

Comments
 (0)