Skip to content

Conversation

@sbidoul
Copy link
Member

@sbidoul sbidoul commented Jan 3, 2026

This very WIP and draft and I'm not even sure this is useful.

One benefit is simpler deployment when the time limit of job workers has to be greater than the small time limit of interactive workers. In that (common) case configur the cron worker time limit would be sufficient instead of deploying another Odoo instance with different worker limits.

It builds on the refactoring done in #866, in particular the _acquire_job function and job execution class methods.

The jobrunner still does the job scheduling (so with full support of channels etc), but /queue_job/runjob triggers crons which acquire jobs in ENQUEUED state and run them.

Look at the last commit to understand how this works, it's pretty simple.

@sbidoul sbidoul added this to the 18.0 milestone Jan 3, 2026
@OCA-git-bot
Copy link
Contributor

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

@sbidoul sbidoul force-pushed the 18.0-cron-jobrunner-sbi branch 2 times, most recently from f038a2a to 13d3aa9 Compare January 3, 2026 14:25
@sbidoul sbidoul force-pushed the 18.0-cron-jobrunner-sbi branch from 13d3aa9 to 3b6f3be Compare January 3, 2026 14:27
@sbidoul
Copy link
Member Author

sbidoul commented Jan 3, 2026

One thing I don't quite understand is why this can raise SerializationFailure.

SELECT uuid FROM queue_job WHERE state='enqueued' LIMIT 1 FOR UPDATE SKIP LOCKED

@sbidoul sbidoul force-pushed the 18.0-cron-jobrunner-sbi branch from 3b6f3be to f6108a7 Compare January 3, 2026 15:19
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.

2 participants