From 041666b07a0d4de2c839c797bda19ea9e003e230 Mon Sep 17 00:00:00 2001 From: Zack Cerza Date: Tue, 29 Apr 2014 11:26:39 -0500 Subject: [PATCH] Add --runs, to print only run names Signed-off-by: Zack Cerza --- scripts/queue.py | 2 ++ teuthology/beanstalk.py | 4 ++++ 2 files changed, 6 insertions(+) diff --git a/scripts/queue.py b/scripts/queue.py index 2dc1bd4b2..324aade02 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 afa4e3053..ebbe9dbce 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)) -- 2.47.3