From 0c790354bd88f24aaed4ca9816f1f234aa3c464c Mon Sep 17 00:00:00 2001 From: Ramy Asselin Date: Mon, 30 Nov 2015 19:12:27 -0800 Subject: [PATCH] Allow queue regex specification In the case where multiple gate queues exist and are name gate-, a regex gate* could be provided without the quotes. Update the code to allow specifying a regex. Change-Id: I24f43f64e71a87989a8dad8570e453a0bbd11402 --- elastic_recheck/cmd/graph.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/elastic_recheck/cmd/graph.py b/elastic_recheck/cmd/graph.py index 135a63e6..1ff9ae77 100755 --- a/elastic_recheck/cmd/graph.py +++ b/elastic_recheck/cmd/graph.py @@ -96,7 +96,7 @@ def main(): parser.add_argument('-o', dest='output', help='output filename. Omit for stdout') parser.add_argument('-q', dest='queue', - help='limit results to a specific build queue') + help='limit results to a build queue regex') parser.add_argument('-c', '--conf', help="Elastic Recheck Configuration " "file to use for data_source options such as " "elastic search url, logstash url, and database " @@ -156,7 +156,7 @@ def main(): for query in classifier.queries: if args.queue: - query['query'] = query['query'] + (' AND build_queue:"%s"' % + query['query'] = query['query'] + (' AND build_queue:%s' % args.queue) if query.get('suppress-graph'): continue