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

[minion-cvs] If we stored a connection event outside of when we beli...



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

Modified Files:
	Pinger.py 
Log Message:
If we stored a connection event outside of when we believed ourself to be up, that means that we missed a shutdown event, not that we got a spurious connection while we were shut down.

Index: Pinger.py
===================================================================
RCS file: /home/minion/cvsroot/src/minion/lib/mixminion/server/Pinger.py,v
retrieving revision 1.16
retrieving revision 1.17
diff -u -d -r1.16 -r1.17
--- Pinger.py	13 Dec 2004 00:23:11 -0000	1.16
+++ Pinger.py	13 Dec 2004 00:56:48 -0000	1.17
@@ -417,10 +417,12 @@
             for at, success in cur:
                 assert success in (0,1)
                 upAt, downAt = myIntervals.getIntervalContaining(at)
-                if upAt == None:
-                    # Event outside edge of interval.
-                    continue
-                if lastTime is None or upAt > lastTime:
+                #if upAt == None:
+                #    # Event outside edge of interval.  This means that
+                #    # it happened after a heartbeat, but we never actually
+                #    # shut down.  That's fine.
+                #    pass
+                if lastTime is None or (upAt and upAt > lastTime):
                     lastTime = upAt
                     lastStatus = None
                 if lastStatus is not None: