mirror of
https://github.com/bec-project/bec_widgets.git
synced 2026-01-01 03:21:19 +01:00
wip
This commit is contained in:
@@ -125,7 +125,7 @@ class RPCServer:
|
||||
def run_rpc(self, obj, method, args, kwargs):
|
||||
# Run with rpc registry broadcast, but only once
|
||||
with RPCRegister.delayed_broadcast():
|
||||
logger.debug(f"Running RPC instruction: {method} with args: {args}, kwargs: {kwargs}")
|
||||
logger.info(f"Running RPC instruction: {method} with args: {args}, kwargs: {kwargs}")
|
||||
method_obj = getattr(obj, method)
|
||||
# check if the method accepts args and kwargs
|
||||
if not callable(method_obj):
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
import os
|
||||
|
||||
from bec_lib.logger import bec_logger
|
||||
from qtpy.QtCore import QSize
|
||||
from qtpy.QtGui import QAction, QActionGroup, QIcon
|
||||
from qtpy.QtWidgets import QApplication, QMainWindow, QStyle
|
||||
@@ -16,6 +17,8 @@ from bec_widgets.widgets.containers.main_window.addons.web_links import BECWebLi
|
||||
|
||||
MODULE_PATH = os.path.dirname(bec_widgets.__file__)
|
||||
|
||||
logger = bec_logger.logger
|
||||
|
||||
|
||||
class BECMainWindow(BECWidget, QMainWindow):
|
||||
RPC = False
|
||||
@@ -170,6 +173,7 @@ class BECMainWindow(BECWidget, QMainWindow):
|
||||
apply_theme(theme)
|
||||
|
||||
def cleanup(self):
|
||||
logger.info("Cleaning up BECMainWindow with delayed broadcast")
|
||||
with RPCRegister.delayed_broadcast():
|
||||
central_widget = self.centralWidget()
|
||||
central_widget.close()
|
||||
|
||||
Reference in New Issue
Block a user