[CalendarServer-changes] [5527] CalendarServer/branches/users/wsanchez/deployment/twistedcaldav/ cluster.py

source_changes at macosforge.org source_changes at macosforge.org
Fri Apr 23 10:09:35 PDT 2010


Revision: 5527
          http://trac.macosforge.org/projects/calendarserver/changeset/5527
Author:   sagen at apple.com
Date:     2010-04-23 10:09:32 -0700 (Fri, 23 Apr 2010)
Log Message:
-----------
Add the "seconds" arg back to signalAll

Modified Paths:
--------------
    CalendarServer/branches/users/wsanchez/deployment/twistedcaldav/cluster.py

Modified: CalendarServer/branches/users/wsanchez/deployment/twistedcaldav/cluster.py
===================================================================
--- CalendarServer/branches/users/wsanchez/deployment/twistedcaldav/cluster.py	2010-04-23 16:54:31 UTC (rev 5526)
+++ CalendarServer/branches/users/wsanchez/deployment/twistedcaldav/cluster.py	2010-04-23 17:09:32 UTC (rev 5527)
@@ -290,7 +290,7 @@
             self._checkConsistency
         )
 
-    def signalAll(self, signal, startswithname=None):
+    def signalAll(self, signal, startswithname=None, seconds=0):
         """
         Send a signal to all child processes.
 
@@ -299,10 +299,14 @@
         @param startswithname: is set only signal those processes
             whose name starts with this string
         @type signal: C{str}
+        @param seconds: how many seconds to delay between each signal
+        @type seconds: C{int}
         """
+        delay = 0
         for name in self.processes.keys():
             if startswithname is None or name.startswith(startswithname):
-                self.signalProcess(signal, name)
+                reactor.callLater(delay, self.signalProcess, signal, name)
+                delay += seconds
 
     def signalProcess(self, signal, name):
         """
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.macosforge.org/pipermail/calendarserver-changes/attachments/20100423/a9a13a62/attachment.html>


More information about the calendarserver-changes mailing list