summaryrefslogtreecommitdiffstats
path: root/src/software
diff options
context:
space:
mode:
authorMichal Minar <miminar@redhat.com>2013-11-08 16:15:46 +0100
committerMichal Minar <miminar@redhat.com>2013-11-08 16:46:30 +0100
commitb9cdba8739dfdbebe5cd65202e7ae642783b183c (patch)
tree2157a9737b4adcfa1b47dec0cdb34068023ac48e /src/software
parent4dbb389e772f48aafd4c56b404a1833ea22ab509 (diff)
downloadopenlmi-providers-b9cdba8739dfdbebe5cd65202e7ae642783b183c.tar.gz
openlmi-providers-b9cdba8739dfdbebe5cd65202e7ae642783b183c.tar.xz
openlmi-providers-b9cdba8739dfdbebe5cd65202e7ae642783b183c.zip
software: fixed termination of JobManager
Let's not process any additional jobs when terminating command has been received.
Diffstat (limited to 'src/software')
-rw-r--r--src/software/lmi/software/yumdb/jobmanager.py3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/software/lmi/software/yumdb/jobmanager.py b/src/software/lmi/software/yumdb/jobmanager.py
index 50c3345..ebe0ba2 100644
--- a/src/software/lmi/software/yumdb/jobmanager.py
+++ b/src/software/lmi/software/yumdb/jobmanager.py
@@ -563,7 +563,8 @@ class JobManager(threading.Thread):
job = self._queue_in.get(timeout=timeout)
with self._job_lock:
self._enqueue_job(job)
- while not self._queue_in.empty():
+ while self._terminate is False and \
+ not self._queue_in.empty():
# this won't throw
self._enqueue_job(self._queue_in.get_nowait())