[CalendarServer-changes] [10246] CalendarServer/branches/users/glyph/queue-locking-and-timing
source_changes at macosforge.org
source_changes at macosforge.org
Fri Jan 4 16:39:04 PST 2013
Revision: 10246
http://trac.calendarserver.org//changeset/10246
Author: glyph at apple.com
Date: 2013-01-04 16:39:04 -0800 (Fri, 04 Jan 2013)
Log Message:
-----------
Missed a spot.
Modified Paths:
--------------
CalendarServer/branches/users/glyph/queue-locking-and-timing/twext/enterprise/locking.py
CalendarServer/branches/users/glyph/queue-locking-and-timing/twext/enterprise/queue.py
Property Changed:
----------------
CalendarServer/branches/users/glyph/queue-locking-and-timing/
Modified: CalendarServer/branches/users/glyph/queue-locking-and-timing/twext/enterprise/locking.py
===================================================================
--- CalendarServer/branches/users/glyph/queue-locking-and-timing/twext/enterprise/locking.py 2013-01-05 00:39:02 UTC (rev 10245)
+++ CalendarServer/branches/users/glyph/queue-locking-and-timing/twext/enterprise/locking.py 2013-01-05 00:39:04 UTC (rev 10246)
@@ -26,6 +26,13 @@
from twext.enterprise.dal.model import Schema
+class AlreadyUnlocked(Exception):
+ """
+ The lock you were trying to unlock was already unlocked.
+ """
+
+
+
def makeLockSchema(inSchema):
"""
Create a self-contained schema just for L{Locker} use, in C{inSchema}.
@@ -71,3 +78,29 @@
raise NotImplementedError()
+
+class AcquiredLock(object):
+ """
+ An L{AcquiredLock} lock against a shared data store that the current
+ process holds via the referenced transaction.
+ """
+
+ def release(self, ignoreAlreadyUnlocked=False):
+ """
+ Release this lock.
+
+ @param ignoreAlreadyUnlocked: If you don't care about the current
+ status of this lock, and just want to release it if it is still
+ acquired, pass this parameter as L{True}. Otherwise this method
+ will raise an exception if it is invoked when the lock has already
+ been released.
+
+ @raise: L{AlreadyUnlocked}
+
+ @return: A L{Deferred} that fires with L{None} when the lock has been
+ unlocked.
+ """
+ raise NotImplementedError()
+
+
+
Modified: CalendarServer/branches/users/glyph/queue-locking-and-timing/twext/enterprise/queue.py
===================================================================
--- CalendarServer/branches/users/glyph/queue-locking-and-timing/twext/enterprise/queue.py 2013-01-05 00:39:02 UTC (rev 10245)
+++ CalendarServer/branches/users/glyph/queue-locking-and-timing/twext/enterprise/queue.py 2013-01-05 00:39:04 UTC (rev 10246)
@@ -384,38 +384,7 @@
))
-class AlreadyUnlocked(Exception):
- """
- The lock you were trying to unlock was already unlocked.
- """
-
-
-class AcquiredLock(object):
- """
- An L{AcquiredLock} lock against a shared data store that the current
- process holds via the referenced transaction.
- """
-
- def release(self, ignoreAlreadyUnlocked=False):
- """
- Release this lock.
-
- @param ignoreAlreadyUnlocked: If you don't care about the current
- status of this lock, and just want to release it if it is still
- acquired, pass this parameter as L{True}. Otherwise this method
- will raise an exception if it is invoked when the lock has already
- been released.
-
- @raise: L{AlreadyUnlocked}
-
- @return: A L{Deferred} that fires with L{None} when the lock has been
- unlocked.
- """
- raise NotImplementedError()
-
-
-
class PerformWork(Command):
"""
Notify another process that it must do some work that has been persisted to
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.macosforge.org/pipermail/calendarserver-changes/attachments/20130104/5b7ebaa3/attachment-0001.html>
More information about the calendarserver-changes
mailing list