[CalendarServer-changes] [8150] CalendarServer/branches/users/sagen/applepush/twistedcaldav/ applepush.py

source_changes at macosforge.org source_changes at macosforge.org
Thu Oct 6 12:05:19 PDT 2011


Revision: 8150
          http://trac.macosforge.org/projects/calendarserver/changeset/8150
Author:   sagen at apple.com
Date:     2011-10-06 12:05:19 -0700 (Thu, 06 Oct 2011)
Log Message:
-----------
Commit after we've removed subscription

Modified Paths:
--------------
    CalendarServer/branches/users/sagen/applepush/twistedcaldav/applepush.py

Modified: CalendarServer/branches/users/sagen/applepush/twistedcaldav/applepush.py
===================================================================
--- CalendarServer/branches/users/sagen/applepush/twistedcaldav/applepush.py	2011-10-06 11:06:10 UTC (rev 8149)
+++ CalendarServer/branches/users/sagen/applepush/twistedcaldav/applepush.py	2011-10-06 19:05:19 UTC (rev 8150)
@@ -306,13 +306,13 @@
         # TODO: actually see if we need to remove the token from subscriptions
         txn = self.store.newTransaction()
         subscriptions = (yield txn.apnSubscriptionsByToken(token))
-        yield txn.commit() # TODO: Glyph, needed?
 
         for key, modified, guid in subscriptions:
             if timestamp > modified:
                 self.log_debug("FeedbackProtocol removing subscription: %s %s" %
                     (token, key))
                 yield txn.removeAPNSubscription(token, key)
+        yield txn.commit()
 
 
 class APNFeedbackFactory(ClientFactory, LoggingMixIn):
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.macosforge.org/pipermail/calendarserver-changes/attachments/20111006/27df1513/attachment.html>


More information about the calendarserver-changes mailing list