style/doc fixes (NFC)

This commit is contained in:
Sébastien Bourdeauducq 2024-02-27 11:10:21 +08:00
parent b2ba087acd
commit bafa69098a
3 changed files with 11 additions and 10 deletions

View File

@ -60,7 +60,7 @@ def get_argparser():
help="friendly name, displayed in dashboards " help="friendly name, displayed in dashboards "
"to identify master instead of server address") "to identify master instead of server address")
parser.add_argument("--log-submissions", default=None, parser.add_argument("--log-submissions", default=None,
help="set the filename to create the experiment subimission") help="log experiment submissions to specified file")
return parser return parser
@ -81,8 +81,7 @@ def main():
bind, args.port_broadcast)) bind, args.port_broadcast))
atexit_register_coroutine(server_broadcast.stop, loop=loop) atexit_register_coroutine(server_broadcast.stop, loop=loop)
log_forwarder.callback = (lambda msg: log_forwarder.callback = lambda msg: server_broadcast.broadcast("log", msg)
server_broadcast.broadcast("log", msg))
def ccb_issue(service, *args, **kwargs): def ccb_issue(service, *args, **kwargs):
msg = { msg = {
"service": service, "service": service,
@ -106,7 +105,8 @@ def main():
repo_backend, worker_handlers, args.experiment_subdir) repo_backend, worker_handlers, args.experiment_subdir)
atexit.register(experiment_db.close) atexit.register(experiment_db.close)
scheduler = Scheduler(RIDCounter(), worker_handlers, experiment_db, args.log_submissions) scheduler = Scheduler(RIDCounter(), worker_handlers, experiment_db,
args.log_submissions)
scheduler.start(loop=loop) scheduler.start(loop=loop)
atexit_register_coroutine(scheduler.stop, loop=loop) atexit_register_coroutine(scheduler.stop, loop=loop)

View File

@ -178,7 +178,8 @@ class ArgumentManager(ProcessArgumentManager):
user_input_deser = pyon.decode(user_input) user_input_deser = pyon.decode(user_input)
value = processor.process(user_input_deser) value = processor.process(user_input_deser)
except: except:
logger.error("failed to process user input, retrying", exc_info=True) logger.error("failed to process user input, retrying",
exc_info=True)
else: else:
success = True success = True
result[key] = value result[key] = value