[CalendarServer-changes] [6865] CalendarServer/branches/users/glyph/db-reconnect/twext/enterprise/ adbapi2.py
source_changes at macosforge.org
source_changes at macosforge.org
Thu Feb 3 11:00:52 PST 2011
Revision: 6865
http://trac.macosforge.org/projects/calendarserver/changeset/6865
Author: glyph at apple.com
Date: 2011-02-03 11:00:52 -0800 (Thu, 03 Feb 2011)
Log Message:
-----------
Renaming for clarity: FailedTxn -> _NoTxn
Modified Paths:
--------------
CalendarServer/branches/users/glyph/db-reconnect/twext/enterprise/adbapi2.py
Modified: CalendarServer/branches/users/glyph/db-reconnect/twext/enterprise/adbapi2.py
===================================================================
--- CalendarServer/branches/users/glyph/db-reconnect/twext/enterprise/adbapi2.py 2011-02-03 19:00:49 UTC (rev 6864)
+++ CalendarServer/branches/users/glyph/db-reconnect/twext/enterprise/adbapi2.py 2011-02-03 19:00:52 UTC (rev 6865)
@@ -170,12 +170,13 @@
return holder.stop()
-class FailedTxn(object):
+class _NoTxn(object):
"""
An L{IAsyncTransaction} that indicates a local failure before we could even
communicate any statements (or possibly even any connection attempts) to the
server.
"""
+ implements(IAsyncTransaction)
def _everything(self, *a, **kw):
"""
@@ -281,7 +282,7 @@
"""
Replace my C{_baseTxn}, currently a L{_WaitingTxn}, with a new
implementation of L{IAsyncTransaction} that will actually do the work;
- either a L{_ConnectedTxn} or a L{FailedTxn}.
+ either a L{_ConnectedTxn} or a L{_NoTxn}.
"""
spooledBase = self._baseTxn
self._baseTxn = baseTxn
@@ -310,7 +311,7 @@
Stop waiting for a free transaction and fail.
"""
self._pool._waiting.remove(self)
- self._unspoolOnto(FailedTxn())
+ self._unspoolOnto(_NoTxn())
return succeed(None)
@@ -469,7 +470,7 @@
"""
tracking = self._busy
if self._stopping:
- basetxn = FailedTxn()
+ basetxn = _NoTxn()
tracking = []
elif self._free:
basetxn = self._free.pop(0)
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.macosforge.org/pipermail/calendarserver-changes/attachments/20110203/a466b551/attachment.html>
More information about the calendarserver-changes
mailing list