From a2139cc49545eeeffd03617f136287581720711d Mon Sep 17 00:00:00 2001 From: Philipp Schmidt <philipp.schmidt@xfel.eu> Date: Mon, 13 Feb 2023 17:28:52 +0100 Subject: [PATCH] Filter configuration feedback for the selected action, instrument and detector --- webservice/update_config.py | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) diff --git a/webservice/update_config.py b/webservice/update_config.py index 603538a24..5143933c6 100755 --- a/webservice/update_config.py +++ b/webservice/update_config.py @@ -257,7 +257,7 @@ def main(): print("-" * 80) pyaml = yaml.dump(new_conf, default_flow_style=False) - print(f"Sending the following update:\n {pyaml}") + print(f"# Sending the following update:\n{pyaml}") print("-" * 80) con = zmq.Context() socket = con.socket(zmq.REQ) @@ -274,8 +274,15 @@ def main(): ]) socket.send(f"['{msg}']".encode()) resp = socket.recv_multipart()[0] - print("Configuration now in place is:") - print(resp.decode()) + print("# Configuration now in place is:") + + total_config = yaml.safe_load(resp.decode()) + + print(yaml.dump({ + action: {instrument: { + karabo_id: total_config[action][instrument][karabo_id] + }} + }, default_flow_style=False)) if __name__ == '__main__': -- GitLab