Skip to content

Commit 0e26e06

Browse files
committed
Adding integration-like tests for migrating/migrated events handling
1 parent a8fe5a6 commit 0e26e06

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
@@ -2202,3 +2202,17 @@ def _update_maintenance_events_config_for_connections(
22022202
with self._lock:
22032203
for conn in tuple(self._connections):
22042204
conn.maintenance_events_config = maintenance_events_config
2205+
2206+
def _update_maintenance_events_configs_for_connections(
2207+
self, maintenance_events_pool_handler
2208+
):
2209+
"""Override base class method to work with BlockingConnectionPool's structure."""
2210+
with self._lock:
2211+
for conn in tuple(self._connections):
2212+
if conn: # conn can be None in BlockingConnectionPool
2213+
conn.set_maintenance_event_pool_handler(
2214+
maintenance_events_pool_handler
2215+
)
2216+
conn.maintenance_events_config = (
2217+
maintenance_events_pool_handler.config
2218+
)

0 commit comments

Comments
 (0)