From 4f0e9440870f6ad4107d79a1c92b500cff8d4fab Mon Sep 17 00:00:00 2001 From: Brian Warner Date: Thu, 31 May 2007 13:44:22 -0700 Subject: [PATCH] node.py: add logging of startup/shutdown, for the cygwin test_system failure --- src/allmydata/node.py | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) 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): -- 2.45.2