Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions rc/control/daqinterface.py
Original file line number Diff line number Diff line change
Expand Up @@ -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,
),
)

Expand Down Expand Up @@ -2483,6 +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:

Expand Down
4 changes: 4 additions & 0 deletions rc/io/rpc.py
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +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,
)
with threaded(target=server.serve_forever, name="rpc-server-%s-%d" % (host, port)):
for name, func in funcs.items():
server.register_function(func, name)
Expand Down
Loading