diff --git a/scripts/queue.py b/scripts/queue.py index 2dc1bd4b2b8..324aade0201 100644 --- a/scripts/queue.py +++ b/scripts/queue.py @@ -6,6 +6,7 @@ import teuthology.beanstalk doc = """ usage: teuthology-queue -h teuthology-queue [-d] -m MACHINE_TYPE + teuthology-queue [-r] -m MACHINE_TYPE teuthology-queue -m MACHINE_TYPE -D PATTERN List Jobs in queue: @@ -19,6 +20,7 @@ optional arguments: -h, --help Show this help message and exit -D, --delete PATTERN Delete Jobs with PATTERN in their name -d, --description Show job descriptions + -r, --runs Only show run names """.format(archive_base=teuthology.config.config.archive_base) diff --git a/teuthology/beanstalk.py b/teuthology/beanstalk.py index afa4e30539d..ebbe9dbce45 100644 --- a/teuthology/beanstalk.py +++ b/teuthology/beanstalk.py @@ -100,6 +100,7 @@ def print_matching_runs(jobs_dict): def main(args): machine_type = args['--machine_type'] delete = args['--delete'] + runs = args['--runs'] show_desc = args['--description'] try: connection = connect() @@ -107,6 +108,9 @@ def main(args): if delete: walk_jobs(connection, machine_type, delete_matching_jobs) + elif runs: + walk_jobs(connection, machine_type, + print_matching_runs) else: walk_jobs(connection, machine_type, _print_matching_jobs(show_desc))