[CalendarServer-changes] [9506] CalendarServer/trunk

source_changes at macosforge.org source_changes at macosforge.org
Mon Jul 30 10:22:26 PDT 2012


Revision: 9506
          http://trac.macosforge.org/projects/calendarserver/changeset/9506
Author:   sagen at apple.com
Date:     2012-07-30 10:22:26 -0700 (Mon, 30 Jul 2012)
Log Message:
-----------
Perform a group cacher update when that sidecar receives SIGHUP.

Modified Paths:
--------------
    CalendarServer/trunk/calendarserver/tap/caldav.py
    CalendarServer/trunk/twistedcaldav/directory/test/test_directory.py

Modified: CalendarServer/trunk/calendarserver/tap/caldav.py
===================================================================
--- CalendarServer/trunk/calendarserver/tap/caldav.py	2012-07-28 00:11:04 UTC (rev 9505)
+++ CalendarServer/trunk/calendarserver/tap/caldav.py	2012-07-30 17:22:26 UTC (rev 9506)
@@ -585,6 +585,7 @@
         Removes pidfile, registers an exec to happen after shutdown, then
         stops the reactor.
         """
+        self.log_info("SIGHUP received - restarting")
         try:
             self.log_info("Removing pidfile: %s" % (self.pidfilePath,))
             os.remove(self.pidfilePath)
@@ -595,7 +596,6 @@
         self.reactor.stop()
 
     def sighupHandler(self, num, frame):
-        self.log_info("SIGHUP received - restarting")
         self.reactor.callFromThread(self.reExec)
 
     def startService(self):

Modified: CalendarServer/trunk/twistedcaldav/directory/test/test_directory.py
===================================================================
--- CalendarServer/trunk/twistedcaldav/directory/test/test_directory.py	2012-07-28 00:11:04 UTC (rev 9505)
+++ CalendarServer/trunk/twistedcaldav/directory/test/test_directory.py	2012-07-30 17:22:26 UTC (rev 9506)
@@ -144,8 +144,16 @@
 
         service.stopService()
 
+        service.updateInProgress = True
+        self.assertTrue((yield service.update()))
+        self.assertTrue(service.updateAwaiting)
 
+        service.updateInProgress = False
+        self.assertFalse((yield service.update()))
+        self.assertFalse(service.updateAwaiting)
 
+
+
     def test_expandedMembers(self):
         """
         Make sure expandedMembers( ) returns a complete, flattened set of
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.macosforge.org/pipermail/calendarserver-changes/attachments/20120730/0134f64b/attachment.html>


More information about the calendarserver-changes mailing list