Skip to content

Commit 63d0c45

Browse files
committed
Adding integration-like tests for migrating/migrated events handling
1 parent 41a199e commit 63d0c45

File tree

2 files changed

+710
-0
lines changed

2 files changed

+710
-0
lines changed

redis/connection.py

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2209,3 +2209,17 @@ def _update_maintenance_events_config_for_connections(
22092209
with self._lock:
22102210
for conn in tuple(self._connections):
22112211
conn.maintenance_events_config = maintenance_events_config
2212+
2213+
def _update_maintenance_events_configs_for_connections(
2214+
self, maintenance_events_pool_handler
2215+
):
2216+
"""Override base class method to work with BlockingConnectionPool's structure."""
2217+
with self._lock:
2218+
for conn in tuple(self._connections):
2219+
if conn: # conn can be None in BlockingConnectionPool
2220+
conn.set_maintenance_event_pool_handler(
2221+
maintenance_events_pool_handler
2222+
)
2223+
conn.maintenance_events_config = (
2224+
maintenance_events_pool_handler.config
2225+
)

0 commit comments

Comments
 (0)