Update 2012-08-27
I've created a wrapper to the decorator that catch, rollback transaction and reraise the exception:-
http://tech.marimore.co.jp/2012/08/django-transactioncommit_manually-wrapper.html
This has happened number of times for me. There's a 3 year old ticket on this actually but since I want to be quick and no time yet to look into the ticket, the solution is to wrap all my function with a decorator that can catch the exception and exit immediately.
I'm doing this in a batch script so what I want is either the script succeed or fail immediately, showing the error. YMMV.
No comments:
Post a Comment