artiq_client: cancel interactive arguments

This commit is contained in:
Simon Renblad 2024-03-25 16:26:53 +08:00 committed by Sébastien Bourdeauducq
parent 5a8bc17e4d
commit 7fa770fba9
1 changed files with 10 additions and 0 deletions

View File

@ -121,6 +121,11 @@ def get_argparser():
"arguments", metavar="ARGUMENTS", nargs="*", "arguments", metavar="ARGUMENTS", nargs="*",
help="interactive arguments") help="interactive arguments")
parser_cancel_interactive = subparsers.add_parser(
"cancel-interactive", help="cancel interactive arguments")
parser_cancel_interactive.add_argument(
"rid", metavar="RID", type=int, help="RID of target experiment")
parser_show = subparsers.add_parser( parser_show = subparsers.add_parser(
"show", help="show schedule, log, devices or datasets") "show", help="show schedule, log, devices or datasets")
parser_show.add_argument( parser_show.add_argument(
@ -222,6 +227,10 @@ def _action_supply_interactive(remote, args):
remote.supply(args.rid, arguments) remote.supply(args.rid, arguments)
def _action_cancel_interactive(remote, args):
remote.cancel(args.rid)
def _action_scan_repository(remote, args): def _action_scan_repository(remote, args):
if getattr(args, "async"): if getattr(args, "async"):
remote.scan_repository_async(args.revision) remote.scan_repository_async(args.revision)
@ -382,6 +391,7 @@ def main():
"del_dataset": "dataset_db", "del_dataset": "dataset_db",
"scan_devices": "device_db", "scan_devices": "device_db",
"supply_interactive": "interactive_arg_db", "supply_interactive": "interactive_arg_db",
"cancel_interactive": "interactive_arg_db",
"scan_repository": "experiment_db", "scan_repository": "experiment_db",
"ls": "experiment_db", "ls": "experiment_db",
"terminate": "master_management", "terminate": "master_management",