[storm] recovering from a transactionrollbackerror
Martin DeMello
martindemello at gmail.com
Mon May 11 16:31:53 BST 2009
The problem with a TransactionRollbackError is that, well, it rolls
back my transaction. Is there any way to retry the transaction or will
I have to redo whatever changes I made to my objects as well? e.g
a = store.get(User, "Martin")
a.access = 'unrestricted'
store.commit() # => TransactionRollbackError
Now, is the store itself irretrievably rolled back? Is there any way
to remember that I had changed the object and just retry the commit? I
had expected this to work
try:
store.commit()
except TransactionRollbackError
store.commit()
but apparently it rolled back the store, not just the database transaction.
martin
More information about the storm
mailing list