Moved locking out of the model layer

This commit is contained in:
Raphael Michel
2015-09-28 23:30:25 +02:00
parent 24c76baec2
commit 28437771cf
3 changed files with 32 additions and 32 deletions

View File

@@ -52,7 +52,7 @@ def release_event(event):
:raises EventLock.LockReleaseException: if we do not own the lock
"""
if not hasattr(event, '_lock') or not event._lock:
raise EventLock.LockReleaseException('')
raise EventLock.LockReleaseException('Lock is not owned by this thread')
if settings.HAS_REDIS:
return release_event_redis(event)
else: