@@ -366,7 +366,7 @@ def __init__(
366
366
self .connection = None
367
367
self ._single_connection_client = single_connection_client
368
368
if self ._single_connection_client :
369
- self .connection = self .connection_pool .get_connection ("_" )
369
+ self .connection = self .connection_pool .get_connection ()
370
370
self ._event_dispatcher .dispatch (
371
371
AfterSingleConnectionInstantiationEvent (
372
372
self .connection , ClientType .SYNC , self .single_connection_lock
@@ -608,7 +608,7 @@ def _execute_command(self, *args, **options):
608
608
"""Execute a command and return a parsed response"""
609
609
pool = self .connection_pool
610
610
command_name = args [0 ]
611
- conn = self .connection or pool .get_connection (command_name , ** options )
611
+ conn = self .connection or pool .get_connection ()
612
612
613
613
if self ._single_connection_client :
614
614
self .single_connection_lock .acquire ()
@@ -667,7 +667,7 @@ class Monitor:
667
667
668
668
def __init__ (self , connection_pool ):
669
669
self .connection_pool = connection_pool
670
- self .connection = self .connection_pool .get_connection ("MONITOR" )
670
+ self .connection = self .connection_pool .get_connection ()
671
671
672
672
def __enter__ (self ):
673
673
self .connection .send_command ("MONITOR" )
@@ -840,9 +840,7 @@ def execute_command(self, *args):
840
840
# subscribed to one or more channels
841
841
842
842
if self .connection is None :
843
- self .connection = self .connection_pool .get_connection (
844
- "pubsub" , self .shard_hint
845
- )
843
+ self .connection = self .connection_pool .get_connection ()
846
844
# register a callback that re-subscribes to any channels we
847
845
# were listening to when we were disconnected
848
846
self .connection .register_connect_callback (self .on_connect )
@@ -1397,7 +1395,7 @@ def immediate_execute_command(self, *args, **options):
1397
1395
conn = self .connection
1398
1396
# if this is the first call, we need a connection
1399
1397
if not conn :
1400
- conn = self .connection_pool .get_connection (command_name , self . shard_hint )
1398
+ conn = self .connection_pool .get_connection ()
1401
1399
self .connection = conn
1402
1400
1403
1401
return conn .retry .call_with_retry (
@@ -1583,7 +1581,7 @@ def execute(self, raise_on_error: bool = True) -> List[Any]:
1583
1581
1584
1582
conn = self .connection
1585
1583
if not conn :
1586
- conn = self .connection_pool .get_connection ("MULTI" , self . shard_hint )
1584
+ conn = self .connection_pool .get_connection ()
1587
1585
# assign to self.connection so reset() releases the connection
1588
1586
# back to the pool after we're done
1589
1587
self .connection = conn
0 commit comments