Add the ability to filter on project

Implement a project-filter option to gearman client config alongside the
job-filter and build-queue-filter options.

Change-Id: Ia71f216f4acc9de145eb9124df691393d2a86808
This commit is contained in:
K Jonathan Harker 2015-06-11 09:13:38 -07:00
parent ac259484a2
commit 622f6d9471
1 changed files with 4 additions and 0 deletions

View File

@ -77,6 +77,10 @@ class EventProcessor(threading.Thread):
not re.match(build_queue_filter,
out_event['fields']['build_queue'])):
continue
project_filter = fileopts.get('project-filter')
if (project_filter and
not re.match(project_filter, out_event['fields']['project'])):
continue
output['source_url'] = source_url
output['retry'] = fileopts.get('retry-get', False)
output['event'] = out_event