[FIX] base_action_rule: automatic commit during background processing of rules

This will make sure already processed rules are persisted
in case a timeout occurs while processing the next ones,
ensuring that *some* progress can be made in most cases.
This commit is contained in:
Olivier Dony 2014-06-11 11:52:29 +02:00
parent cf0be50f04
commit 5ccfeaaeda
2 changed files with 5 additions and 1 deletions

View File

@ -280,3 +280,7 @@ class base_action_rule(osv.osv):
_logger.error(traceback.format_exc())
action.write({'last_run': now.strftime(DEFAULT_SERVER_DATETIME_FORMAT)})
if automatic:
# auto-commit for batch processing
cr.commit()

View File

@ -10,7 +10,7 @@
<field eval="False" name="doall"/>
<field eval="'base.action.rule'" name="model"/>
<field eval="'_check'" name="function"/>
<field eval="'()'" name="args"/>
<field eval="'(True,)'" name="args"/>
</record>
</data>