@@ -2018,9 +2018,7 @@ def update_active_connections_for_reconnect(
2018
2018
:param tmp_relax_timeout: The relax timeout to use for the connection.
2019
2019
"""
2020
2020
for conn in self ._in_use_connections :
2021
- if self .should_update_connection (
2022
- conn , "connected" , moving_address_src
2023
- ):
2021
+ if self .should_update_connection (conn , "connected" , moving_address_src ):
2024
2022
self ._update_connection_for_reconnect (
2025
2023
conn , tmp_host_address , tmp_relax_timeout
2026
2024
)
@@ -2042,9 +2040,7 @@ def disconnect_and_reconfigure_free_connections(
2042
2040
"""
2043
2041
2044
2042
for conn in self ._available_connections :
2045
- if self .should_update_connection (
2046
- conn , "connected" , moving_address_src
2047
- ):
2043
+ if self .should_update_connection (conn , "connected" , moving_address_src ):
2048
2044
self ._disconnect_and_update_connection_for_reconnect (
2049
2045
conn , tmp_host_address , tmp_relax_timeout
2050
2046
)
@@ -2312,15 +2308,15 @@ def disconnect(self):
2312
2308
self ._locked = False
2313
2309
2314
2310
def update_connections_settings (
2315
- self ,
2316
- state : Optional ["MaintenanceState" ] = None ,
2317
- relax_timeout : Optional [float ] = None ,
2318
- matching_address : Optional [str ] = None ,
2319
- address_type_to_match : Literal ["connected" , "configured" ] = "connected" ,
2320
- reset_host_address : bool = False ,
2321
- reset_relax_timeout : bool = False ,
2322
- include_free_connections : bool = True ,
2323
- ):
2311
+ self ,
2312
+ state : Optional ["MaintenanceState" ] = None ,
2313
+ relax_timeout : Optional [float ] = None ,
2314
+ matching_address : Optional [str ] = None ,
2315
+ address_type_to_match : Literal ["connected" , "configured" ] = "connected" ,
2316
+ reset_host_address : bool = False ,
2317
+ reset_relax_timeout : bool = False ,
2318
+ include_free_connections : bool = True ,
2319
+ ):
2324
2320
"""
2325
2321
Override base class method to work with BlockingConnectionPool's structure.
2326
2322
"""
@@ -2424,4 +2420,3 @@ def set_in_maintenance(self, in_maintenance: bool):
2424
2420
The pool will be in maintenance mode only when we are processing a MOVING event.
2425
2421
"""
2426
2422
self ._in_maintenance = in_maintenance
2427
-
0 commit comments