mirror of
https://github.com/bec-project/bec_widgets.git
synced 2026-05-11 09:05:43 +02:00
fix(rpc/client_utils): close clean up policy for BECFigure
This commit is contained in:
@@ -1,4 +1,6 @@
|
||||
import inspect
|
||||
import threading
|
||||
import time
|
||||
|
||||
from bec_lib import MessageEndpoints, messages
|
||||
from qtpy.QtCore import QTimer
|
||||
@@ -109,17 +111,25 @@ class BECWidgetsCLIServer:
|
||||
def shutdown(self):
|
||||
self._shutdown_event = True
|
||||
self._heartbeat_timer.stop()
|
||||
self.client.shutdown()
|
||||
|
||||
|
||||
if __name__ == "__main__": # pragma: no cover
|
||||
import argparse
|
||||
import sys
|
||||
|
||||
from qtpy.QtCore import QSize
|
||||
from qtpy.QtGui import QIcon
|
||||
from qtpy.QtWidgets import QApplication, QMainWindow
|
||||
|
||||
app = QApplication(sys.argv)
|
||||
app.setApplicationName("BEC Figure")
|
||||
icon = QIcon()
|
||||
icon.addFile("bec_widgets_icon.png", size=QSize(48, 48))
|
||||
app.setWindowIcon(icon)
|
||||
|
||||
win = QMainWindow()
|
||||
win.setWindowTitle("BEC Widgets")
|
||||
|
||||
parser = argparse.ArgumentParser(description="BEC Widgets CLI Server")
|
||||
parser.add_argument("--id", type=str, help="The id of the server")
|
||||
|
||||
Reference in New Issue
Block a user