[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]

[minion-cvs] Make shutdown work again. (We needed a way to say "shu...



Update of /home/minion/cvsroot/src/minion/lib/mixminion
In directory moria.mit.edu:/tmp/cvs-serv19587/lib/mixminion

Modified Files:
	ThreadUtils.py 
Log Message:
Make shutdown work again.  (We needed a way to say "shut down the database thread once it is finished with what it is doing.)

Index: ThreadUtils.py
===================================================================
RCS file: /home/minion/cvsroot/src/minion/lib/mixminion/ThreadUtils.py,v
retrieving revision 1.7
retrieving revision 1.8
diff -u -d -r1.7 -r1.8
--- ThreadUtils.py	12 Dec 2004 23:24:30 -0000	1.7
+++ ThreadUtils.py	13 Dec 2004 01:06:43 -0000	1.8
@@ -273,9 +273,10 @@
         self.mqueue = ClearableQueue()
         self.threadName = name
 
-    def shutdown(self):
+    def shutdown(self,flush=1):
+        """DOCDOC"""
         LOG.info("Telling %s to shut down.", self.threadName)
-        self.mqueue.clear()
+        if flush: self.mqueue.clear()
         self.mqueue.put(ProcessingThread._Shutdown())
 
     def addJob(self, job):