Skip to content

Commit 047a483

Browse files
committed
[FIX] queue_job: Commit was removed, but that could be a problem if you generated too much records
1 parent bab89cf commit 047a483

1 file changed

Lines changed: 3 additions & 1 deletion

File tree

queue_job/models/queue_job.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77

88
from odoo import _, api, exceptions, fields, models
99
from odoo.osv import expression
10-
from odoo.tools import html_escape
10+
from odoo.tools import config, html_escape
1111

1212
from odoo.addons.base_sparse_field.models.fields import Serialized
1313

@@ -409,6 +409,8 @@ def autovacuum(self):
409409
)
410410
if jobs:
411411
jobs.unlink()
412+
if not config["test_enable"]:
413+
self.env.cr.commit() # pylint: disable=E8102
412414
else:
413415
break
414416
return True

0 commit comments

Comments
 (0)