Skip to content

Conversation

@OCA-git-bot
Copy link
Contributor

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

sbidoul and others added 12 commits January 8, 2026 15:18
This allows creating test job with a long duration for stress testing.
When a SerializationFailure occurs when updating the state of dependent
jobs, the cursor is not usable anymore so the retry failed with `current transaction is aborted`. A savepoint fixes that.
In this commit we cleanly separate the job acquisition (i.e. verifying the job is in the exepected state, marking it started and locking it) from job execution.

We also avoid trying to start the job if it is already locked by using SKIP LOCKED
and exiting early. Indeed in such situations the job is likely already being handled by another worker so there is no point trying to start it, so we exit early
and let it be handled either by the other worker or the dead job requeuer.
Extract the logic to run one job out of the /queue_job/runjob route.
Towards making this logic reusable in other job executors.
Since we are not going to delete records nor modify foreign keys,
we can take a weaker lock.
@thomaspaulb thomaspaulb force-pushed the 16.0-queue_job-backports branch from b4dada5 to 227a5e7 Compare January 8, 2026 14:19
…rts patches

Otherwise monkey-patches could be added twice when instantiating new test classes.
@thomaspaulb thomaspaulb changed the title Draft: [16.0] queue_job: backports [16.0] queue_job: backports from 18.0 Jan 8, 2026
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.

5 participants