From 72efc09320519b97824aa286ddda3d92d89f979d Mon Sep 17 00:00:00 2001 From: Simon Corrodi Date: Tue, 21 Apr 2026 10:53:45 -0500 Subject: [PATCH 1/2] slightely improved diagnostics --- rc/control/daqinterface.py | 4 ++-- rc/io/rpc.py | 1 + 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/rc/control/daqinterface.py b/rc/control/daqinterface.py index 59e00031..34335a58 100755 --- a/rc/control/daqinterface.py +++ b/rc/control/daqinterface.py @@ -636,12 +636,11 @@ def __init__( self.print_log( "i", - '%s: DAQInterface in partition %s launched and now in "%s" state, listening on port %d' + '%s: DAQInterface in partition %s launched and now in "%s" state' % ( date_and_time(), self.partition_number, self.state(self.name), - self.rpc_port, ), ) @@ -2471,6 +2470,7 @@ def process_command(self, procinfo_index, command): proc_starttimes = {} proc_endtimes = {} + for subsystem in subsystems_in_order: for proctype in proctypes_in_order: diff --git a/rc/io/rpc.py b/rc/io/rpc.py index 50d8292a..3df53758 100644 --- a/rc/io/rpc.py +++ b/rc/io/rpc.py @@ -45,6 +45,7 @@ def stop(self): @contextlib.contextmanager def rpc_server(host="", port=6000, funcs={}, timeout=0.01): server = StoppableRPCServer((host, port), timeout=timeout) + print("DAQInterface RPC server listening on %s:%d" % (host or "0.0.0.0", port), flush=True) with threaded(target=server.serve_forever, name="rpc-server-%s-%d" % (host, port)): for name, func in funcs.items(): server.register_function(func, name) From 6767c3a5b4a478def74ba6b1a657668b899d4a51 Mon Sep 17 00:00:00 2001 From: Eric Flumerfelt Date: Thu, 23 Apr 2026 07:56:02 -0500 Subject: [PATCH 2/2] Reformat --- rc/control/daqinterface.py | 2 +- rc/io/rpc.py | 5 ++++- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/rc/control/daqinterface.py b/rc/control/daqinterface.py index 9e328605..ec59de9e 100755 --- a/rc/control/daqinterface.py +++ b/rc/control/daqinterface.py @@ -2482,7 +2482,7 @@ def process_command(self, procinfo_index, command): proc_starttimes = {} proc_endtimes = {} - + for subsystem in subsystems_in_order: for proctype in proctypes_in_order: diff --git a/rc/io/rpc.py b/rc/io/rpc.py index 3df53758..46eac2f4 100644 --- a/rc/io/rpc.py +++ b/rc/io/rpc.py @@ -45,7 +45,10 @@ def stop(self): @contextlib.contextmanager def rpc_server(host="", port=6000, funcs={}, timeout=0.01): server = StoppableRPCServer((host, port), timeout=timeout) - print("DAQInterface RPC server listening on %s:%d" % (host or "0.0.0.0", port), flush=True) + print( + "DAQInterface RPC server listening on %s:%d" % (host or "0.0.0.0", port), + flush=True, + ) with threaded(target=server.serve_forever, name="rpc-server-%s-%d" % (host, port)): for name, func in funcs.items(): server.register_function(func, name)