[CalendarServer-changes] [11354] CalendarServer/branches/users/glyph/warning-cleanups/txdav/common/ datastore/sql.py

source_changes at macosforge.org source_changes at macosforge.org
Thu Jun 13 16:21:09 PDT 2013


Revision: 11354
          http://trac.calendarserver.org//changeset/11354
Author:   glyph at apple.com
Date:     2013-06-13 16:21:08 -0700 (Thu, 13 Jun 2013)
Log Message:
-----------
Add a 'yield' and '@inlineCallbacks' to NotificationCollection.notifyChanged so it won't do non-local exits, and so it will return a Deferred.

Modified Paths:
--------------
    CalendarServer/branches/users/glyph/warning-cleanups/txdav/common/datastore/sql.py

Modified: CalendarServer/branches/users/glyph/warning-cleanups/txdav/common/datastore/sql.py
===================================================================
--- CalendarServer/branches/users/glyph/warning-cleanups/txdav/common/datastore/sql.py	2013-06-13 23:21:08 UTC (rev 11353)
+++ CalendarServer/branches/users/glyph/warning-cleanups/txdav/common/datastore/sql.py	2013-06-13 23:21:08 UTC (rev 11354)
@@ -4890,12 +4890,14 @@
         return (self._txn._homeClass[self._txn._primaryHomeType]._notifierPrefix, "%s" % (self.ownerHome().uid(),),)
 
 
+    @inlineCallbacks
     def notifyChanged(self):
         """
-        Send notifications, change sync token and bump last modified because the resource has changed. We ensure
-        we only do this once per object per transaction.
+        Send notifications, change sync token and bump last modified because
+        the resource has changed.  We ensure we only do this once per object
+        per transaction.
         """
-
+        yield
         if self._txn.isNotifiedAlready(self):
             returnValue(None)
         self._txn.notificationAddedForObject(self)
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.macosforge.org/pipermail/calendarserver-changes/attachments/20130613/303b3a3a/attachment.html>


More information about the calendarserver-changes mailing list