[FIX] rollback transaction on exception to keep database in expected state

bzr revid: tristan.hill@credativ.co.uk-20110105092348-l6354716s7yf7sup
This commit is contained in:
Tristan Hill
2011-01-05 09:23:48 +00:00
parent fc20503f95
commit 0a29f54262
+1
View File
@@ -90,6 +90,7 @@ class ir_cron(osv.osv, netsvc.Agent):
try:
f(cr, uid, *args)
except Exception, e:
cr.rollback()
self._logger.notifyChannel('timers', netsvc.LOG_ERROR, "Job call of self.pool.get('%s').%s(cr, uid, *%r) failed" % (model, func, args))
self._logger.notifyChannel('timers', netsvc.LOG_ERROR, tools.exception_to_unicode(e))