[CalendarServer-changes] [8731] CalendarServer/branches/users/cdaboo/txn-debugging/twistedcaldav/ scheduling/processing.py
source_changes at macosforge.org
source_changes at macosforge.org
Mon Feb 20 14:22:11 PST 2012
Revision: 8731
http://trac.macosforge.org/projects/calendarserver/changeset/8731
Author: cdaboo at apple.com
Date: 2012-02-20 14:22:10 -0800 (Mon, 20 Feb 2012)
Log Message:
-----------
Make sure we always abort a txn when using inNewTransaction.
Modified Paths:
--------------
CalendarServer/branches/users/cdaboo/txn-debugging/twistedcaldav/scheduling/processing.py
Modified: CalendarServer/branches/users/cdaboo/txn-debugging/twistedcaldav/scheduling/processing.py
===================================================================
--- CalendarServer/branches/users/cdaboo/txn-debugging/twistedcaldav/scheduling/processing.py 2012-02-20 22:15:07 UTC (rev 8730)
+++ CalendarServer/branches/users/cdaboo/txn-debugging/twistedcaldav/scheduling/processing.py 2012-02-20 22:22:10 UTC (rev 8731)
@@ -334,9 +334,9 @@
# request object but we need to be able to map the actual reply resource to its
# URL when doing auto-processing, so we have to sneak that mapping back in here.
txn = yield self.organizer_calendar_resource.inNewTransaction(self.request)
- organizer_resource = (yield self.request.locateResource(self.organizer_calendar_resource._url))
try:
+ organizer_resource = (yield self.request.locateResource(self.organizer_calendar_resource._url))
if organizer_resource.exists():
yield self._doRefresh(organizer_resource, only_attendees=attendeesToProcess)
else:
@@ -344,6 +344,9 @@
except Exception, e:
log.debug("ImplicitProcessing - refresh exception UID: '%s', %s" % (self.uid, str(e)))
yield txn.abort()
+ except:
+ log.debug("ImplicitProcessing - refresh bare exception UID: '%s'" % (self.uid,))
+ yield txn.abort()
else:
yield txn.commit()
finally:
@@ -641,15 +644,19 @@
# request object but we need to be able to map the actual reply resource to its
# URL when doing auto-processing, so we have to sneak that mapping back in here.
txn = yield resource.inNewTransaction(self.request)
- self.request._rememberResource(resource, resource._url)
try:
+ self.request._rememberResource(resource, resource._url)
# Send out a reply
log.debug("ImplicitProcessing - recipient '%s' processing UID: '%s' - auto-reply: %s" % (self.recipient.cuaddr, self.uid, partstat))
from twistedcaldav.scheduling.implicit import ImplicitScheduler
scheduler = ImplicitScheduler()
yield scheduler.sendAttendeeReply(self.request, resource, calendar, self.recipient)
+ except Exception, e:
+ log.debug("ImplicitProcessing - auto-reply exception UID: '%s', %s" % (self.uid, str(e)))
+ yield txn.abort()
except:
+ log.debug("ImplicitProcessing - auto-reply bare exception UID: '%s'" % (self.uid,))
yield txn.abort()
else:
yield txn.commit()
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.macosforge.org/pipermail/calendarserver-changes/attachments/20120220/0005ad37/attachment-0001.html>
More information about the calendarserver-changes
mailing list