]> git.rkrishnan.org Git - tahoe-lafs/tahoe-lafs.git/commitdiff
node.py: add logging of startup/shutdown, for the cygwin test_system failure
authorBrian Warner <warner@allmydata.com>
Thu, 31 May 2007 20:44:22 +0000 (13:44 -0700)
committerBrian Warner <warner@allmydata.com>
Thu, 31 May 2007 20:44:22 +0000 (13:44 -0700)
src/allmydata/node.py

index 81b8b1ebf609ec365e4aac154e98702b34a21e9e..58fb6a63aa7d48e7743b083ad831847838329aa1 100644 (file)
@@ -69,10 +69,12 @@ class Node(service.MultiService):
 
     def startService(self):
         # note: this class can only be started and stopped once.
+        self.log("Node.startService")
         eventual.eventually(self._startService)
 
     def _startService(self):
         precondition(reactor.running)
+        self.log("Node._startService")
 
         service.MultiService.startService(self)
         d = defer.succeed(None)
@@ -86,13 +88,18 @@ class Node(service.MultiService):
         d.addCallback(_ready)
 
     def stopService(self):
+        self.log("Node.stopService")
         d = self._tub_ready_observerlist.when_fired()
-        d.addCallback(lambda ignored_result: service.MultiService.stopService(self))
+        def _really_stopService(ignored):
+            self.log("Node._really_stopService")
+            return service.MultiService.stopService(self)
+        d.addCallback(_really_stopService)
         return d
-       
+
     def shutdown(self):
         """Shut down the node. Returns a Deferred that fires (with None) when
         it finally stops kicking."""
+        self.log("Node.shutdown")
         return self.stopService()
 
     def log(self, msg):