diff --git a/artiq/frontend/artiq_client.py b/artiq/frontend/artiq_client.py index dad25112a..31d639a59 100755 --- a/artiq/frontend/artiq_client.py +++ b/artiq/frontend/artiq_client.py @@ -37,9 +37,6 @@ def get_argparser(): help="run the experiment in timed mode. " "argument specifies the time of the first run, " "use 'now' to run immediately") - parser_add.add_argument( - "-t", "--timeout", default=None, type=float, - help="specify a timeout for the experiment to complete") parser_add.add_argument("-e", "--experiment", default=None, help="experiment to run") parser_add.add_argument("--rtr-group", default=None, type=str, @@ -105,7 +102,6 @@ def _action_submit(remote, args): run_params = { "file": args.file, "experiment": args.experiment, - "timeout": args.timeout, "arguments": arguments, "rtr_group": args.rtr_group if args.rtr_group is not None \ else args.file @@ -148,12 +144,13 @@ def _action_del_parameter(remote, args): def _show_queue(queue): clear_screen() if queue: - table = PrettyTable(["RID", "File", "Experiment", "Timeout", - "Arguments"]) + table = PrettyTable(["RID", "File", "Experiment", "Arguments"]) for rid, run_params in queue: row = [rid, run_params["file"]] - for x in run_params["experiment"], run_params["timeout"]: - row.append("" if x is None else x) + if run_params["experiment"] is None: + row.append("") + else: + row.append(run_params["experiment"]) row.append(format_arguments(run_params["arguments"])) table.add_row(row) print(table) @@ -165,13 +162,15 @@ def _show_timed(timed): clear_screen() if timed: table = PrettyTable(["Next run", "TRID", "File", "Experiment", - "Timeout", "Arguments"]) + "Arguments"]) sp = sorted(timed.items(), key=lambda x: (x[1][0], x[0])) for trid, (next_run, run_params) in sp: row = [time.strftime("%m/%d %H:%M:%S", time.localtime(next_run)), trid, run_params["file"]] - for x in run_params["experiment"], run_params["timeout"]: - row.append("" if x is None else x) + if run_params["experiment"] is None: + row.append("") + else: + row.append(run_params["experiment"]) row.append(format_arguments(run_params["arguments"])) table.add_row(row) print(table) diff --git a/artiq/frontend/artiq_run.py b/artiq/frontend/artiq_run.py index bb4d03bea..b530f4e02 100755 --- a/artiq/frontend/artiq_run.py +++ b/artiq/frontend/artiq_run.py @@ -140,7 +140,6 @@ def main(): run_params = { "file": args.file, "experiment": args.experiment, - "timeout": None, "arguments": arguments } exp_inst = exp(dbh, diff --git a/artiq/gui/explorer.py b/artiq/gui/explorer.py index fb829bdbf..3fe7c5e7a 100644 --- a/artiq/gui/explorer.py +++ b/artiq/gui/explorer.py @@ -147,7 +147,6 @@ class ExplorerWindow(Window): run_params = { "file": data["file"], "experiment": data["experiment"], - "timeout": None, "arguments": arguments, "rtr_group": data["file"] } diff --git a/artiq/gui/scheduler.py b/artiq/gui/scheduler.py index 00e177b5f..3b8e41e76 100644 --- a/artiq/gui/scheduler.py +++ b/artiq/gui/scheduler.py @@ -12,8 +12,10 @@ class _QueueStoreSyncer(ListSyncer): def convert(self, x): rid, run_params = x row = [rid, run_params["file"]] - for e in run_params["experiment"], run_params["timeout"]: - row.append("" if e is None else str(e)) + if run_params["experiment"] is None: + row.append("") + else: + row.append(run_params["experiment"]) row.append(format_arguments(run_params["arguments"])) return row @@ -27,8 +29,10 @@ class _TimedStoreSyncer(DictSyncer): next_run, run_params = x row = [time.strftime("%m/%d %H:%M:%S", time.localtime(next_run)), trid, run_params["file"]] - for e in run_params["experiment"], run_params["timeout"]: - row.append("" if e is None else str(e)) + if run_params["experiment"] is None: + row.append("") + else: + row.append(run_params["experiment"]) row.append(format_arguments(run_params["arguments"])) return row @@ -55,9 +59,9 @@ class SchedulerWindow(Window): notebook = Gtk.Notebook() topvbox.pack_start(notebook, True, True, 0) - self.queue_store = Gtk.ListStore(int, str, str, str, str) + self.queue_store = Gtk.ListStore(int, str, str, str) self.queue_tree = Gtk.TreeView(self.queue_store) - for i, title in enumerate(["RID", "File", "Experiment", "Timeout", "Arguments"]): + for i, title in enumerate(["RID", "File", "Experiment", "Arguments"]): renderer = Gtk.CellRendererText() column = Gtk.TreeViewColumn(title, renderer, text=i) self.queue_tree.append_column(column) @@ -79,10 +83,10 @@ class SchedulerWindow(Window): vbox.set_border_width(6) notebook.insert_page(vbox, Gtk.Label("Queue"), -1) - self.timed_store = Gtk.ListStore(str, int, str, str, str, str) + self.timed_store = Gtk.ListStore(str, int, str, str, str) self.timed_tree = Gtk.TreeView(self.timed_store) for i, title in enumerate(["Next run", "TRID", "File", "Experiment", - "Timeout", "Arguments"]): + "Arguments"]): renderer = Gtk.CellRendererText() column = Gtk.TreeViewColumn(title, renderer, text=i) self.timed_tree.append_column(column) diff --git a/artiq/master/worker.py b/artiq/master/worker.py index d42626212..11ebccb80 100644 --- a/artiq/master/worker.py +++ b/artiq/master/worker.py @@ -67,7 +67,7 @@ class Worker: if obj != "ack": raise WorkerFailed("Incorrect acknowledgement") while True: - obj = yield from self._recv(run_params["timeout"]) + obj = yield from self._recv(None) action = obj["action"] if action == "report_completed": if obj["status"] != "ok":