From: Brian Warner Date: Thu, 31 May 2007 20:44:22 +0000 (-0700) Subject: node.py: add logging of startup/shutdown, for the cygwin test_system failure X-Git-Tag: allmydata-tahoe-0.3.0~44 X-Git-Url: https://git.rkrishnan.org/(%5B%5E?a=commitdiff_plain;h=4f0e9440870f6ad4107d79a1c92b500cff8d4fab;p=tahoe-lafs%2Ftahoe-lafs.git node.py: add logging of startup/shutdown, for the cygwin test_system failure --- diff --git a/src/allmydata/node.py b/src/allmydata/node.py index 81b8b1eb..58fb6a63 100644 --- a/src/allmydata/node.py +++ b/src/allmydata/node.py @@ -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):