mirror of
https://github.com/bec-project/bec_widgets.git
synced 2026-11-23 09:38:10 +01:00
refactor: replace deprecated bec_lib connector internals
This commit is contained in:
1 parent
a8d4406551
commit
70a32dee4f
3 files changed
+19
-14
No files matched your search
@@ -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:
|
||||
"""
|
||||
|
||||
@@ -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)
|
||||
|
||||
Reference in new issue
Block a user