[CalendarServer-changes] [8249] CalendarServer/branches/users/glyph/parallel-sim/contrib/performance /loadtest/ampsim.py

source_changes at macosforge.org source_changes at macosforge.org
Tue Nov 1 17:52:29 PDT 2011


Revision: 8249
          http://trac.macosforge.org/projects/calendarserver/changeset/8249
Author:   glyph at apple.com
Date:     2011-11-01 17:52:29 -0700 (Tue, 01 Nov 2011)
Log Message:
-----------
Stop the reactor when the worker's connection is lost.

Modified Paths:
--------------
    CalendarServer/branches/users/glyph/parallel-sim/contrib/performance/loadtest/ampsim.py

Modified: CalendarServer/branches/users/glyph/parallel-sim/contrib/performance/loadtest/ampsim.py
===================================================================
--- CalendarServer/branches/users/glyph/parallel-sim/contrib/performance/loadtest/ampsim.py	2011-11-02 00:52:14 UTC (rev 8248)
+++ CalendarServer/branches/users/glyph/parallel-sim/contrib/performance/loadtest/ampsim.py	2011-11-02 00:52:29 UTC (rev 8249)
@@ -52,11 +52,8 @@
 
 from plistlib import writePlistToString, readPlistFromString
 
-from zope.interface import implements
-
 from twisted.python.log import msg, addObserver
 from twisted.protocols.amp import AMP, Command, String, Unicode
-from twisted.internet.interfaces import IHalfCloseableProtocol
 
 from twext.enterprise.adbapi2 import Pickle
 
@@ -99,8 +96,6 @@
     manager.
     """
 
-    implements(IHalfCloseableProtocol)
-
     def __init__(self, reactor):
         super(Worker, self).__init__()
         self.reactor = reactor
@@ -134,17 +129,10 @@
     def connectionLost(self, reason):
         super(Worker, self).connectionLost(reason)
         msg("Standard IO connection lost.")
+        self.reactor.stop()
 
 
-    def readConnectionLost(self):
-        msg("Read connection lost.")
 
-
-    def writeConnectionLost(self):
-        msg("Write connection lost.")
-
-
-
 class Manager(AMP):
     """
     Protocol to be run in the coordinating process, to respond to messages from
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.macosforge.org/pipermail/calendarserver-changes/attachments/20111101/a0baf9e3/attachment.html>


More information about the calendarserver-changes mailing list