Browse Source

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
Matthew Treinish 3 years ago
parent
commit
fa6b116168
No account linked to committer's email address
1 changed files with 3 additions and 4 deletions
  1. 3
    4
      files/subunit-gearman-worker.py

+ 3
- 4
files/subunit-gearman-worker.py View File

@@ -23,7 +23,6 @@ import json
23 23
 import logging
24 24
 import os
25 25
 import socket
26
-import threading
27 26
 import time
28 27
 import urllib2
29 28
 import yaml
@@ -54,9 +53,9 @@ class FilterException(Exception):
54 53
     pass
55 54
 
56 55
 
57
-class SubunitRetriever(threading.Thread):
56
+class SubunitRetriever(object):
58 57
     def __init__(self, gearman_worker, filters, subunit2sql_conf):
59
-        threading.Thread.__init__(self)
58
+        super(SubunitRetriever, self).__init__()
60 59
         self.gearman_worker = gearman_worker
61 60
         self.filters = filters
62 61
         # Initialize subunit2sql settings
@@ -233,7 +232,7 @@ class Server(object):
233 232
 
234 233
     def main(self):
235 234
         self.setup_retriever()
236
-        self.retriever.start()
235
+        self.retriever.run()
237 236
 
238 237
 
239 238
 def main():

Loading…
Cancel
Save