Skip to content

Commit d747f48

Browse files
committed
Remove duplicated code, added TODO's
1 parent 5d2ddb0 commit d747f48

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

redis/asyncio/cluster.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1569,9 +1569,7 @@ def __init__(
15691569
)
15701570

15711571
async def initialize(self) -> "ClusterPipeline":
1572-
if self.cluster_client._initialize:
1573-
await self._execution_strategy.initialize()
1574-
self._execution_strategy._command_queue = []
1572+
await self._execution_strategy.initialize()
15751573
return self
15761574

15771575
async def __aenter__(self) -> "ClusterPipeline":
@@ -1584,10 +1582,12 @@ def __await__(self) -> Generator[Any, None, "ClusterPipeline"]:
15841582
return self.initialize().__await__()
15851583

15861584
def __enter__(self) -> "ClusterPipeline":
1585+
# TODO: Remove this method before 7.0.0
15871586
self._execution_strategy._command_queue = []
15881587
return self
15891588

15901589
def __exit__(self, exc_type: None, exc_value: None, traceback: None) -> None:
1590+
# TODO: Remove this method before 7.0.0
15911591
self._execution_strategy._command_queue = []
15921592

15931593
def __bool__(self) -> bool:

0 commit comments

Comments
 (0)