Skip to content
Snippets Groups Projects
Commit 1c9e998b authored by Loan (lse)'s avatar Loan (lse)
Browse files

[FIX] Commit transient model vacuuming directly


Before this commit:
If the "Base: Auto-vacuum internal data" is archived since a long time, auto-vacuuming models may timeout. As the commit was previously done at the end of the cron, the process wouldn't have been applied. As a consequence the Scheduled action will timeout every time

After this commit:
The commit is done right after each model vacuuming

OPW-2638706

closes odoo/odoo#77730

Signed-off-by: default avatarRaphael Collet (rco) <rco@openerp.com>
parent c7476f80
Branches
Tags
No related merge requests found
......@@ -22,6 +22,7 @@ class AutoVacuum(models.AbstractModel):
try:
with self._cr.savepoint():
model._transient_vacuum(force=True)
self._cr.commit()
except Exception as e:
_logger.warning("Failed to clean transient model %s\n%s", model, str(e))
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment