refactor: replace deprecated bec_lib connector internals

This commit is contained in:
wyzula_j authored and Jan Wyzula committed 2026-07-24 16:34:14 +02:00
1 parent a8d4406551
commit 70a32dee4f
3 files changed
+19 -14

No files matched your search

+5 -2
View File
@@ -308,8 +308,11 @@ class BECDispatcher:
*args: Arbitrary positional arguments
**kwargs: Arbitrary keyword arguments
"""
# pylint: disable=protected-access
self.disconnect_topics(self.client.connector._topics_cb)
topics = set()
for connected_slot in self._registered_slots.values():
topics.update(connected_slot.topics)
if topics:
self.disconnect_topics(list(topics))
def disconnect_owner(self, owner: BECWidget) -> int:
"""
+3 -1
View File
@@ -11,7 +11,9 @@ class QtRedisMessageWaiter:
self.response = None
self.connector = redis_connector
self.message_to_wait = message_to_wait
self.pubsub = redis_connector._redis_conn.pubsub()
# Access the managed (buffered) connection directly; the connector-level
# _redis_conn accessor is deprecated in bec_lib.
self.pubsub = redis_connector._managed_connection._redis_conn.pubsub()
self.pubsub.subscribe(self.message_to_wait.endpoint)
fd = self.pubsub.connection._sock.fileno()
self.notifier = QSocketNotifier(fd, QSocketNotifier.Read)