[CalendarServer-changes] [11954] CalendarServer/branches/users/cdaboo/CalendarServer-5.0-podfix/ twistedcaldav
source_changes at macosforge.org
source_changes at macosforge.org
Wed Mar 12 11:24:36 PDT 2014
Revision: 11954
http://trac.calendarserver.org//changeset/11954
Author: cdaboo at apple.com
Date: 2013-11-15 10:51:53 -0800 (Fri, 15 Nov 2013)
Log Message:
-----------
Change CONFLICT to SERVICE_UNAVAILABLE for memcache lock timeouts.
Modified Paths:
--------------
CalendarServer/branches/users/cdaboo/CalendarServer-5.0-podfix/twistedcaldav/method/put_common.py
CalendarServer/branches/users/cdaboo/CalendarServer-5.0-podfix/twistedcaldav/storebridge.py
Modified: CalendarServer/branches/users/cdaboo/CalendarServer-5.0-podfix/twistedcaldav/method/put_common.py
===================================================================
--- CalendarServer/branches/users/cdaboo/CalendarServer-5.0-podfix/twistedcaldav/method/put_common.py 2013-11-15 16:24:25 UTC (rev 11953)
+++ CalendarServer/branches/users/cdaboo/CalendarServer-5.0-podfix/twistedcaldav/method/put_common.py 2013-11-15 18:51:53 UTC (rev 11954)
@@ -86,7 +86,7 @@
try:
yield self.lock.acquire()
except MemcacheLockTimeoutError:
- raise HTTPError(StatusResponse(responsecode.CONFLICT, "Resource: %s currently in use on the server." % (self.uri,)))
+ raise HTTPError(StatusResponse(responsecode.SERVICE_UNAVAILABLE, "Resource: %s currently in use on the server." % (self.uri,)))
# Lets use a deferred for this and loop a few times if we cannot reserve so that we give
# time to whoever has the reservation to finish and release it.
@@ -110,7 +110,7 @@
if self.lock:
# Can release immediately as nothing happened
yield self.lock.release()
- raise HTTPError(StatusResponse(responsecode.CONFLICT, "Resource: %s currently in use in calendar." % (self.uri,)))
+ raise HTTPError(StatusResponse(responsecode.SERVICE_UNAVAILABLE, "Resource: %s currently in use in calendar." % (self.uri,)))
@inlineCallbacks
def unreserve(self):
Modified: CalendarServer/branches/users/cdaboo/CalendarServer-5.0-podfix/twistedcaldav/storebridge.py
===================================================================
--- CalendarServer/branches/users/cdaboo/CalendarServer-5.0-podfix/twistedcaldav/storebridge.py 2013-11-15 16:24:25 UTC (rev 11953)
+++ CalendarServer/branches/users/cdaboo/CalendarServer-5.0-podfix/twistedcaldav/storebridge.py 2013-11-15 18:51:53 UTC (rev 11954)
@@ -2564,7 +2564,7 @@
except MemcacheLockTimeoutError:
raise HTTPError(StatusResponse(
- CONFLICT,
+ SERVICE_UNAVAILABLE,
"Resource: %s currently in use on the server." % (where,))
)
@@ -3180,7 +3180,7 @@
self._initializeWithObject(None)
except MemcacheLockTimeoutError:
- raise HTTPError(StatusResponse(CONFLICT, "Resource: %s currently in use on the server." % (where,)))
+ raise HTTPError(StatusResponse(SERVICE_UNAVAILABLE, "Resource: %s currently in use on the server." % (where,)))
except NoSuchObjectResourceError:
raise HTTPError(NOT_FOUND)
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.macosforge.org/pipermail/calendarserver-changes/attachments/20140312/fa9a56d9/attachment.html>
More information about the calendarserver-changes
mailing list