Forgot to commit transaction

This commit is contained in:
Ask Solem 2012-02-27 14:19:00 +00:00
parent 316512379a
commit c2029d6044
1 changed files with 2 additions and 2 deletions

View File

@ -57,12 +57,12 @@ class MessageManager(models.Manager):
result.save()
recv = self.__class__._messages_received
recv[0] += 1
transaction.commit()
if not recv[0] % self.cleanup_every:
self.cleanup()
transaction.commit()
return result.payload
except self.model.DoesNotExist:
pass
transaction.commit()
except:
transaction.rollback()