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

[minion-cvs] Make pinger run at least 5 minutes without crashing.



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

Modified Files:
	ThreadUtils.py test.py 
Log Message:
Make pinger run at least 5 minutes without crashing.

Index: ThreadUtils.py
===================================================================
RCS file: /home/minion/cvsroot/src/minion/lib/mixminion/ThreadUtils.py,v
retrieving revision 1.6
retrieving revision 1.7
diff -u -d -r1.6 -r1.7
--- ThreadUtils.py	12 Dec 2004 22:28:39 -0000	1.6
+++ ThreadUtils.py	12 Dec 2004 23:24:30 -0000	1.7
@@ -274,7 +274,7 @@
         self.threadName = name
 
     def shutdown(self):
-        LOG.info("Telling %s to shut down.", self.name)
+        LOG.info("Telling %s to shut down.", self.threadName)
         self.mqueue.clear()
         self.mqueue.put(ProcessingThread._Shutdown())
 
@@ -290,11 +290,12 @@
                 job = self.mqueue.get()
                 job()
         except ProcessingThread._Shutdown:
-            LOG.info("Shutting down %s",self.name)
+            LOG.info("Shutting down %s",self.threadName)
             return
         except:
             LOG.error_exc(sys.exc_info(),
-                          "Exception in %s; shutting down thread.",self.name)
+                          "Exception in %s; shutting down thread.",
+                          self.threadName)
 
 class BackgroundingDecorator:
     """DOCDOC"""
@@ -312,5 +313,6 @@
         self._baseObject = obj
 
     def __getattr__(self, attr):
+        if attr[0]=='_': return getattr(self._baseObject,attr)#XXXX
         fn = getattr(self._baseObject,attr)
         return self._AddJob(self._thread,fn)

Index: test.py
===================================================================
RCS file: /home/minion/cvsroot/src/minion/lib/mixminion/test.py,v
retrieving revision 1.211
retrieving revision 1.212
diff -u -d -r1.211 -r1.212
--- test.py	12 Dec 2004 22:28:39 -0000	1.211
+++ test.py	12 Dec 2004 23:24:30 -0000	1.212
@@ -7737,7 +7737,7 @@
             return
 
         d = mix_mktemp()
-        os.mkdir(d)
+        os.mkdir(d,0700)
         loc = os.path.join(d, "db")
         t = previousMidnight(time.time())+3600
         log = P.openPingLog(None,location=loc)