From bd559b039048e45d8fc33971f2a672d50e59cdba Mon Sep 17 00:00:00 2001
From: Matthew Treinish <mtreinish@kortar.org>
Date: Tue, 18 Nov 2014 22:00:56 -0500
Subject: [PATCH] Add support to log gearman client to filter on build-queue

This commit adds a new job filter to the gearman client to filter
based on the build queue. This is used for the subunit jobs which
we don't want to run on check jobs.

Change-Id: If81fe98d8d67bb718c53a963695a7d06f5f6625d
---
 log_processor/client.py | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/log_processor/client.py b/log_processor/client.py
index e699796..03aa038 100644
--- a/log_processor/client.py
+++ b/log_processor/client.py
@@ -72,6 +72,11 @@ class EventProcessor(threading.Thread):
             if (job_filter and
                 not re.match(job_filter, out_event['fields']['build_name'])):
                 continue
+            build_queue_filter = fileopts.get('build-queue-filter')
+            if (build_queue_filter and
+                not re.match(build_queue_filter,
+                             out_event['fields']['build_queue'])):
+                continue
             output['source_url'] = source_url
             output['retry'] = fileopts.get('retry-get', False)
             output['event'] = out_event