forked from M-Labs/artiq
master: add friendly name
This commit is contained in:
parent
2852e793ab
commit
fafabacf97
|
@ -48,6 +48,8 @@ def get_argparser():
|
||||||
|
|
||||||
log_args(parser)
|
log_args(parser)
|
||||||
|
|
||||||
|
parser.add_argument("--name", help="friendly name")
|
||||||
|
|
||||||
return parser
|
return parser
|
||||||
|
|
||||||
|
|
||||||
|
@ -94,6 +96,12 @@ def main():
|
||||||
scheduler.start()
|
scheduler.start()
|
||||||
atexit_register_coroutine(scheduler.stop)
|
atexit_register_coroutine(scheduler.stop)
|
||||||
|
|
||||||
|
class MasterConfig:
|
||||||
|
def get_name(self):
|
||||||
|
return args.name
|
||||||
|
config = MasterConfig()
|
||||||
|
|
||||||
|
|
||||||
worker_handlers.update({
|
worker_handlers.update({
|
||||||
"get_device_db": device_db.get_device_db,
|
"get_device_db": device_db.get_device_db,
|
||||||
"get_device": device_db.get,
|
"get_device": device_db.get,
|
||||||
|
@ -112,7 +120,8 @@ def main():
|
||||||
"master_device_db": device_db,
|
"master_device_db": device_db,
|
||||||
"master_dataset_db": dataset_db,
|
"master_dataset_db": dataset_db,
|
||||||
"master_schedule": scheduler,
|
"master_schedule": scheduler,
|
||||||
"master_experiment_db": experiment_db
|
"master_experiment_db": experiment_db,
|
||||||
|
"master_config": config
|
||||||
}, allow_parallel=True)
|
}, allow_parallel=True)
|
||||||
loop.run_until_complete(server_control.start(
|
loop.run_until_complete(server_control.start(
|
||||||
bind, args.port_control))
|
bind, args.port_control))
|
||||||
|
|
Loading…
Reference in New Issue