summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMatthew Treinish <mtreinish@kortar.org>2016-04-20 16:13:26 -0400
committerMatthew Treinish <mtreinish@kortar.org>2016-04-20 16:13:26 -0400
commitfa6b1161680769d4ad9b2049e7b4095738940971 (patch)
treed95b78639ba0ab81c3236c7521c77ca8e8ce2137
parentfa17a37a52c5dbb232e2fd10400ba466c8cb4b9e (diff)
Stop using a seperate retreiver thread
Since we recently switched from having 2 threads, 1 to retreive subunit and 1 to process it, to having a single thread do both there isn't any reason to launch to run that in a separate thread anymore. This commit just removes the use of threading and runs everything in the single process. Change-Id: I5205fc73178b7d5a4bbee61e68b16b63499f5dd8
Notes
Notes (review): Code-Review+2: James E. Blair <corvus@inaugust.com> Code-Review+2: Matthew Treinish <mtreinish@kortar.org> Workflow+1: Matthew Treinish <mtreinish@kortar.org> Verified+2: Jenkins Submitted-by: Jenkins Submitted-at: Thu, 21 Apr 2016 16:31:16 +0000 Reviewed-on: https://review.openstack.org/308567 Project: openstack-infra/puppet-subunit2sql Branch: refs/heads/master
-rw-r--r--files/subunit-gearman-worker.py7
1 files changed, 3 insertions, 4 deletions
diff --git a/files/subunit-gearman-worker.py b/files/subunit-gearman-worker.py
index 83eaedf..60ff2ec 100644
--- a/files/subunit-gearman-worker.py
+++ b/files/subunit-gearman-worker.py
@@ -23,7 +23,6 @@ import json
23import logging 23import logging
24import os 24import os
25import socket 25import socket
26import threading
27import time 26import time
28import urllib2 27import urllib2
29import yaml 28import yaml
@@ -54,9 +53,9 @@ class FilterException(Exception):
54 pass 53 pass
55 54
56 55
57class SubunitRetriever(threading.Thread): 56class SubunitRetriever(object):
58 def __init__(self, gearman_worker, filters, subunit2sql_conf): 57 def __init__(self, gearman_worker, filters, subunit2sql_conf):
59 threading.Thread.__init__(self) 58 super(SubunitRetriever, self).__init__()
60 self.gearman_worker = gearman_worker 59 self.gearman_worker = gearman_worker
61 self.filters = filters 60 self.filters = filters
62 # Initialize subunit2sql settings 61 # Initialize subunit2sql settings
@@ -233,7 +232,7 @@ class Server(object):
233 232
234 def main(self): 233 def main(self):
235 self.setup_retriever() 234 self.setup_retriever()
236 self.retriever.start() 235 self.retriever.run()
237 236
238 237
239def main(): 238def main():