[CalendarServer-changes] [13941] CalendarServer/trunk/txdav/caldav/datastore/scheduling/imip/inbound .py

source_changes at macosforge.org source_changes at macosforge.org
Fri Sep 5 13:25:47 PDT 2014


Revision: 13941
          http://trac.calendarserver.org//changeset/13941
Author:   sagen at apple.com
Date:     2014-09-05 13:25:47 -0700 (Fri, 05 Sep 2014)
Log Message:
-----------
If IMIP was enabled and then disabled, turn off polling when the already existing work item fires.

Modified Paths:
--------------
    CalendarServer/trunk/txdav/caldav/datastore/scheduling/imip/inbound.py

Modified: CalendarServer/trunk/txdav/caldav/datastore/scheduling/imip/inbound.py
===================================================================
--- CalendarServer/trunk/txdav/caldav/datastore/scheduling/imip/inbound.py	2014-09-04 20:14:20 UTC (rev 13940)
+++ CalendarServer/trunk/txdav/caldav/datastore/scheduling/imip/inbound.py	2014-09-05 20:25:47 UTC (rev 13941)
@@ -90,9 +90,14 @@
         Return the interval in seconds between regenerating instances.
         """
         mailRetriever = self.transaction._mailRetriever
-        return mailRetriever.settings["PollingSeconds"]
+        if mailRetriever is not None:
+            return mailRetriever.settings["PollingSeconds"]
 
+        # The lack of mailRetriever means IMIP polling is turned off.
+        # Returning None will cause this work item to no longer be scheduled.
+        return None
 
+
     @inlineCallbacks
     def doWork(self):
 
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.macosforge.org/pipermail/calendarserver-changes/attachments/20140905/1ff8b108/attachment.html>


More information about the calendarserver-changes mailing list