0
0
mirror of https://github.com/bec-project/bec_widgets.git synced 2025-07-14 03:31:50 +02:00

fix: ignore GUI server output (any output will go to log file)

If a logger is given to log `_start_log_process`, the server stdout and
stderr streams will be redirected as log entries with levels DEBUG or ERROR
in their parent process
This commit is contained in:
2024-06-17 09:03:15 +02:00
committed by wyzula_j
parent 3644f344da
commit ce374163ca
2 changed files with 38 additions and 29 deletions

View File

@ -29,9 +29,7 @@ def gui_id():
@contextmanager
def plot_server(gui_id, klass, client_lib):
dispatcher = BECDispatcher(client=client_lib) # Has to init singleton with fixture client
process, output_thread = _start_plot_process(
gui_id, klass, client_lib._client._service_config.config_path
)
process, _ = _start_plot_process(gui_id, klass, client_lib._client._service_config.config_path)
try:
while client_lib._client.connector.get(MessageEndpoints.gui_heartbeat(gui_id)) is None:
time.sleep(0.3)
@ -39,7 +37,6 @@ def plot_server(gui_id, klass, client_lib):
finally:
process.terminate()
process.wait()
output_thread.join()
dispatcher.disconnect_all()
dispatcher.reset_singleton()