Add transaction rollback

This commit is contained in:
Roberto Rosario
2012-02-06 14:56:27 -04:00
parent 248a5ea82d
commit eef1114be2
3 changed files with 14 additions and 6 deletions

View File

@@ -22,6 +22,7 @@ class LockManager(models.Manager):
logger.debug('acquired lock: %s' % name)
return lock
except IntegrityError, msg:
transaction.rollback()
logger.debug('IntegrityError: %s', msg)
# There is already an existing lock
# Check it's expiration date and if expired, reset it