msmith - in flumotion/trunk: . flumotion/worker
flumotion-commit at lists.fluendo.com
flumotion-commit at lists.fluendo.com
Thu Jun 28 11:58:18 CEST 2007
Author: msmith
Date: Thu Jun 28 11:58:15 2007
New Revision: 5274
Modified:
flumotion/trunk/ChangeLog
flumotion/trunk/flumotion/worker/worker.py
Log:
* flumotion/worker/worker.py:
Don't run the shutdown handler twice, as it tracebacks if we do so.
Fixes #697.
Modified: flumotion/trunk/ChangeLog
==============================================================================
--- flumotion/trunk/ChangeLog (original)
+++ flumotion/trunk/ChangeLog Thu Jun 28 11:58:15 2007
@@ -1,3 +1,9 @@
+2007-06-28 Michael Smith <msmith at fluendo.com>
+
+ * flumotion/worker/worker.py:
+ Don't run the shutdown handler twice, as it tracebacks if we do so.
+ Fixes #697.
+
2007-06-27 Andy Wingo <wingo at pobox.com>
* configure.ac:
Modified: flumotion/trunk/flumotion/worker/worker.py
==============================================================================
--- flumotion/trunk/flumotion/worker/worker.py (original)
+++ flumotion/trunk/flumotion/worker/worker.py Thu Jun 28 11:58:15 2007
@@ -116,6 +116,7 @@
# configured to have 0 tcp ports; setup this in listen()
self.feedServer = None
+ self.stopping = False
reactor.addSystemEventTrigger('before', 'shutdown',
self.shutdownHandler)
self._installHUPHandler()
@@ -181,7 +182,12 @@
return self.medium.callRemote(methodName, *args, **kwargs)
def shutdownHandler(self):
+ if self.stopping:
+ self.warning("Already shutting down, ignoring shutdown request")
+ return
+
self.info("Reactor shutting down, stopping jobHeaven")
+ self.stopping = True
l = [self.jobHeaven.shutdown()]
if self.feedServer:
More information about the flumotion-commit
mailing list