summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorTim Laszlo <tim.laszlo@gmail.com>2012-06-14 18:17:15 -0500
committerTim Laszlo <tim.laszlo@gmail.com>2012-06-14 18:17:15 -0500
commit5dba50f1db4b9807a137a2f40b338010eaf297ea (patch)
tree40b09fc6f1dcd278affa1884193b4ad160a354ba /src
parentd6f6290a2db83cbcb9829431b37b1c510c28bdd8 (diff)
downloadbcfg2-5dba50f1db4b9807a137a2f40b338010eaf297ea.tar.gz
bcfg2-5dba50f1db4b9807a137a2f40b338010eaf297ea.tar.bz2
bcfg2-5dba50f1db4b9807a137a2f40b338010eaf297ea.zip
ThreadedStatistics: Set daemon=False for ThreadedStatistic
Revert d0555789f2af89817b4bf50a4d88e98ad6c20730 Set daemon=False for ThreadedStatistics. Resolves an issue where the thread is left running after the interpreter has shutdown.
Diffstat (limited to 'src')
-rw-r--r--src/lib/Bcfg2/Server/Plugin.py6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/lib/Bcfg2/Server/Plugin.py b/src/lib/Bcfg2/Server/Plugin.py
index 8a193dfab..a68a9e80e 100644
--- a/src/lib/Bcfg2/Server/Plugin.py
+++ b/src/lib/Bcfg2/Server/Plugin.py
@@ -212,7 +212,7 @@ class ThreadedStatistics(Statistics,
self.terminate = core.terminate
self.work_queue = Queue(100000)
self.pending_file = "%s/etc/%s.pending" % (datastore, self.__class__.__name__)
- self.daemon = True
+ self.daemon = False
self.start()
def save(self):
@@ -284,7 +284,7 @@ class ThreadedStatistics(Statistics,
def run(self):
if not self.load():
return
- while not self.terminate.isSet() and self.work_queue != None:
+ while not self.terminate.isSet():
try:
(xdata, client) = self.work_queue.get(block=True, timeout=2)
except Empty:
@@ -294,7 +294,7 @@ class ThreadedStatistics(Statistics,
self.logger.error("ThreadedStatistics: %s" % e)
continue
self.handle_statistic(xdata, client)
- if self.work_queue != None and not self.work_queue.empty():
+ if not self.work_queue.empty():
self.save()
def process_statistics(self, metadata, data):