@@ -366,7 +366,7 @@ def __init__(
366366 self .connection = None
367367 self ._single_connection_client = single_connection_client
368368 if self ._single_connection_client :
369- self .connection = self .connection_pool .get_connection ("_" )
369+ self .connection = self .connection_pool .get_connection ()
370370 self ._event_dispatcher .dispatch (
371371 AfterSingleConnectionInstantiationEvent (
372372 self .connection , ClientType .SYNC , self .single_connection_lock
@@ -608,7 +608,7 @@ def _execute_command(self, *args, **options):
608608 """Execute a command and return a parsed response"""
609609 pool = self .connection_pool
610610 command_name = args [0 ]
611- conn = self .connection or pool .get_connection (command_name , ** options )
611+ conn = self .connection or pool .get_connection ()
612612
613613 if self ._single_connection_client :
614614 self .single_connection_lock .acquire ()
@@ -667,7 +667,7 @@ class Monitor:
667667
668668 def __init__ (self , connection_pool ):
669669 self .connection_pool = connection_pool
670- self .connection = self .connection_pool .get_connection ("MONITOR" )
670+ self .connection = self .connection_pool .get_connection ()
671671
672672 def __enter__ (self ):
673673 self .connection .send_command ("MONITOR" )
@@ -840,9 +840,7 @@ def execute_command(self, *args):
840840 # subscribed to one or more channels
841841
842842 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 ()
846844 # register a callback that re-subscribes to any channels we
847845 # were listening to when we were disconnected
848846 self .connection .register_connect_callback (self .on_connect )
@@ -1397,7 +1395,7 @@ def immediate_execute_command(self, *args, **options):
13971395 conn = self .connection
13981396 # if this is the first call, we need a connection
13991397 if not conn :
1400- conn = self .connection_pool .get_connection (command_name , self . shard_hint )
1398+ conn = self .connection_pool .get_connection ()
14011399 self .connection = conn
14021400
14031401 return conn .retry .call_with_retry (
@@ -1583,7 +1581,7 @@ def execute(self, raise_on_error: bool = True) -> List[Any]:
15831581
15841582 conn = self .connection
15851583 if not conn :
1586- conn = self .connection_pool .get_connection ("MULTI" , self . shard_hint )
1584+ conn = self .connection_pool .get_connection ()
15871585 # assign to self.connection so reset() releases the connection
15881586 # back to the pool after we're done
15891587 self .connection = conn
0 commit comments