Skip to content

[16.0] Add 'Allow Commit' option on job functions#910

Open
lmignon wants to merge 8 commits intoOCA:16.0from
acsone:16.0-add-optional-new-cr
Open

[16.0] Add 'Allow Commit' option on job functions#910
lmignon wants to merge 8 commits intoOCA:16.0from
acsone:16.0-add-optional-new-cr

Conversation

@lmignon
Copy link
Contributor

@lmignon lmignon commented Mar 17, 2026

Backport of #899

guewen and others added 8 commits March 17, 2026 16:25
It is forbidden to commit inside a job, because it releases the job lock
and can cause it to start again, while still being run, by the dead jobs
requeuer. For some use cases, it may actually be legitimate, or at least
be needed in the short term before actual updates in the code.

A new option on the job function, false by default, allow to run the job
in a new transaction, at the cost of an additional connection +
transaction overhead.

Related to OCA#889
False on new databases, True on existing databases.
Should always be False by default on future versions.
As the controller changes env on Job instances.
@OCA-git-bot
Copy link
Contributor

Hi @guewen, @sbidoul,
some modules you are maintaining are being modified, check this out!

@lmignon lmignon marked this pull request as ready for review March 18, 2026 08:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants