[CalendarServer-changes] [11888] CalendarServer/branches/users/glyph/whenNotProposed/twext/ enterprise/queue.py

source_changes at macosforge.org source_changes at macosforge.org
Wed Mar 12 11:19:13 PDT 2014


Revision: 11888
          http://trac.calendarserver.org//changeset/11888
Author:   glyph at apple.com
Date:     2013-11-04 12:07:32 -0800 (Mon, 04 Nov 2013)
Log Message:
-----------
Make the test pass.

Modified Paths:
--------------
    CalendarServer/branches/users/glyph/whenNotProposed/twext/enterprise/queue.py

Modified: CalendarServer/branches/users/glyph/whenNotProposed/twext/enterprise/queue.py
===================================================================
--- CalendarServer/branches/users/glyph/whenNotProposed/twext/enterprise/queue.py	2013-11-04 20:07:32 UTC (rev 11887)
+++ CalendarServer/branches/users/glyph/whenNotProposed/twext/enterprise/queue.py	2013-11-04 20:07:32 UTC (rev 11888)
@@ -948,7 +948,7 @@
         waiting for the transaction where that addition was completed to
         commit, and asking the local node controller process to do the work.
         """
-        @passthru(self.workItemType.create(self.txn, **self.kw).addCallback)
+        created = self.workItemType.create(self.txn, **self.kw)
         def whenCreated(item):
             self._whenProposed.callback(self)
             @self.txn.postCommit
@@ -971,6 +971,9 @@
             @self.txn.postAbort
             def whenFailed():
                 self._whenCommitted.errback(TransactionFailed)
+        def whenNotCreated(failure):
+            self._whenProposed.errback(failure)
+        created.addCallbacks(whenCreated, whenNotCreated)
 
 
     def whenExecuted(self):
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.macosforge.org/pipermail/calendarserver-changes/attachments/20140312/4887f80b/attachment.html>


More information about the calendarserver-changes mailing list