From 92eb3947a40c7b2bd3c31a649e3ad1c95667c5fd Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=A9bastien=20Bourdeauducq?= Date: Tue, 27 Feb 2024 15:20:48 +0800 Subject: [PATCH] master: shorten RPC target names --- artiq/applets/simple.py | 2 +- artiq/browser/datasets.py | 2 +- artiq/examples/artiq_ipython_notebook.ipynb | 2 +- artiq/frontend/artiq_client.py | 14 +++++++------- artiq/frontend/artiq_dashboard.py | 2 +- artiq/frontend/artiq_master.py | 8 ++++---- 6 files changed, 15 insertions(+), 15 deletions(-) diff --git a/artiq/applets/simple.py b/artiq/applets/simple.py index cd980bb34..a77496081 100644 --- a/artiq/applets/simple.py +++ b/artiq/applets/simple.py @@ -255,7 +255,7 @@ class SimpleApplet: if self.embed is None: dataset_ctl = RPCClient() self.loop.run_until_complete(dataset_ctl.connect_rpc( - self.args.server, self.args.port_control, "master_dataset_db")) + self.args.server, self.args.port_control, "dataset_db")) self.req = AppletRequestRPC(self.loop, dataset_ctl) else: self.req = AppletRequestIPC(self.ipc) diff --git a/artiq/browser/datasets.py b/artiq/browser/datasets.py index 815f7acbf..6e5473786 100644 --- a/artiq/browser/datasets.py +++ b/artiq/browser/datasets.py @@ -33,7 +33,7 @@ class DatasetCtl: try: remote = RPCClient() await remote.connect_rpc(self.master_host, self.master_port, - "master_dataset_db") + "dataset_db") try: if op_name == "set": await remote.set(key_or_mod, value, persist, metadata) diff --git a/artiq/examples/artiq_ipython_notebook.ipynb b/artiq/examples/artiq_ipython_notebook.ipynb index 7964cd5a4..5f988b3b9 100644 --- a/artiq/examples/artiq_ipython_notebook.ipynb +++ b/artiq/examples/artiq_ipython_notebook.ipynb @@ -127,7 +127,7 @@ "# let's connect to the master\n", "\n", "schedule, exps, datasets = [\n", - " Client(\"::1\", 3251, \"master_\" + i) for i in\n", + " Client(\"::1\", 3251, i) for i in\n", " \"schedule experiment_db dataset_db\".split()]\n", "\n", "print(\"current schedule\")\n", diff --git a/artiq/frontend/artiq_client.py b/artiq/frontend/artiq_client.py index d945f6853..a83cfd774 100755 --- a/artiq/frontend/artiq_client.py +++ b/artiq/frontend/artiq_client.py @@ -343,13 +343,13 @@ def main(): else: port = 3251 if args.port is None else args.port target_name = { - "submit": "master_schedule", - "delete": "master_schedule", - "set_dataset": "master_dataset_db", - "del_dataset": "master_dataset_db", - "scan_devices": "master_device_db", - "scan_repository": "master_experiment_db", - "ls": "master_experiment_db", + "submit": "schedule", + "delete": "schedule", + "set_dataset": "dataset_db", + "del_dataset": "dataset_db", + "scan_devices": "device_db", + "scan_repository": "experiment_db", + "ls": "experiment_db", "terminate": "master_management", }[action] remote = Client(args.server, port, target_name) diff --git a/artiq/frontend/artiq_dashboard.py b/artiq/frontend/artiq_dashboard.py index f906240a3..e9c6269d3 100755 --- a/artiq/frontend/artiq_dashboard.py +++ b/artiq/frontend/artiq_dashboard.py @@ -143,7 +143,7 @@ def main(): for target in "schedule", "experiment_db", "dataset_db", "device_db": client = AsyncioClient() loop.run_until_complete(client.connect_rpc( - args.server, args.port_control, "master_" + target)) + args.server, args.port_control, target)) atexit.register(client.close_rpc) rpc_clients[target] = client diff --git a/artiq/frontend/artiq_master.py b/artiq/frontend/artiq_master.py index 3e5d4dd11..074d50e48 100755 --- a/artiq/frontend/artiq_master.py +++ b/artiq/frontend/artiq_master.py @@ -133,10 +133,10 @@ def main(): server_control = RPCServer({ "master_management": master_management, - "master_device_db": device_db, - "master_dataset_db": dataset_db, - "master_schedule": scheduler, - "master_experiment_db": experiment_db, + "device_db": device_db, + "dataset_db": dataset_db, + "schedule": scheduler, + "experiment_db": experiment_db, }, allow_parallel=True) loop.run_until_complete(server_control.start( bind, args.port_control))