[CalendarServer-changes] [4140] CalendarServer/branches/users/wsanchez/deployment/twistedcaldav/ static.py

source_changes at macosforge.org source_changes at macosforge.org
Sat May 2 10:53:28 PDT 2009


Revision: 4140
          http://trac.macosforge.org/projects/calendarserver/changeset/4140
Author:   wsanchez at apple.com
Date:     2009-05-02 10:53:28 -0700 (Sat, 02 May 2009)
Log Message:
-----------
Wait on deferred

Modified Paths:
--------------
    CalendarServer/branches/users/wsanchez/deployment/twistedcaldav/static.py

Modified: CalendarServer/branches/users/wsanchez/deployment/twistedcaldav/static.py
===================================================================
--- CalendarServer/branches/users/wsanchez/deployment/twistedcaldav/static.py	2009-05-02 15:45:33 UTC (rev 4139)
+++ CalendarServer/branches/users/wsanchez/deployment/twistedcaldav/static.py	2009-05-02 17:53:28 UTC (rev 4140)
@@ -358,14 +358,16 @@
                 method = "http_" + method
                 original = getattr(similar, method)
 
+                @inlineCallbacks
                 def override(request, original=original):
-                    # Call original method
-                    response = original(request)
 
+                    # Call original method (which is deferred)
+                    response = (yield original(request))
+
                     # Wipe the cache
                     similar.deadProperties().flushCache()
 
-                    return response
+                    returnValue(response)
 
                 setattr(similar, method, override)
 
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.macosforge.org/pipermail/calendarserver-changes/attachments/20090502/1d703704/attachment.html>


More information about the calendarserver-changes mailing list