mirror of
https://github.com/bec-project/bec_widgets.git
synced 2026-06-30 08:39:50 +02:00
chore: rename buffered to managed
This commit is contained in:
@@ -12,7 +12,7 @@ import redis
|
||||
from bec_lib.client import BECClient
|
||||
from bec_lib.logger import bec_logger
|
||||
from bec_lib.redis_connector import MessageObject, RedisConnector
|
||||
from bec_lib.redis_connector.buffered_redis_connector import BufferedRedisConnector
|
||||
from bec_lib.redis_connector.managed_redis_connection import ManagedRedisConnection
|
||||
from bec_lib.service_config import ServiceConfig
|
||||
from qtpy.QtCore import QObject
|
||||
from qtpy.QtCore import Signal as pyqtSignal
|
||||
@@ -100,7 +100,7 @@ class QtThreadSafeCallback(QObject):
|
||||
self.cb_signal.emit(msg_content, metadata)
|
||||
|
||||
|
||||
class QtBufferedRedisConnector(BufferedRedisConnector):
|
||||
class QtManagedRedisConnection(ManagedRedisConnection):
|
||||
def _execute_callback(self, cb, msg, kwargs):
|
||||
if not isinstance(cb, QtThreadSafeCallback):
|
||||
return super()._execute_callback(cb, msg, kwargs)
|
||||
@@ -123,7 +123,7 @@ class QtBufferedRedisConnector(BufferedRedisConnector):
|
||||
|
||||
|
||||
class QtRedisConnector(RedisConnector):
|
||||
connector_cls = QtBufferedRedisConnector
|
||||
connector_cls = QtManagedRedisConnection
|
||||
|
||||
|
||||
class BECDispatcher:
|
||||
|
||||
@@ -240,7 +240,7 @@ def test_qt_redis_connector_logs_rpc_before_qt_callback(monkeypatch):
|
||||
)
|
||||
|
||||
try:
|
||||
connector._buffered_connection._execute_callback(cb, {"data": rpc_msg}, {})
|
||||
connector._managed_connection._execute_callback(cb, {"data": rpc_msg}, {})
|
||||
|
||||
info_mock.assert_called_once()
|
||||
info_message = info_mock.call_args.args[0]
|
||||
|
||||
Reference in New Issue
Block a user