Skip to content

[WIP] queue_job: extract controller's runjob as JobExecutor#945

Draft
guewen wants to merge 2 commits into
OCA:18.0from
guewen:18.0-job-executor
Draft

[WIP] queue_job: extract controller's runjob as JobExecutor#945
guewen wants to merge 2 commits into
OCA:18.0from
guewen:18.0-job-executor

Conversation

@guewen

@guewen guewen commented Jul 13, 2026

Copy link
Copy Markdown
Member

Draft / experiment around job execution / state and env management

@OCA-git-bot

Copy link
Copy Markdown
Contributor

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

@guewen guewen force-pushed the 18.0-job-executor branch from 9ca3275 to 5d8cd0c Compare July 13, 2026 14:33
Rough draft of API changes we could do (well, a direction), not taking
account of backward compatilibity yet, not considering everything etc..

Main ideas

* keep the Job pure data, not linked to an env
* A Job only exists when the db record exists, and when performed, the
  execution environment must be passed
* The Executor will have to deal with a control env and an execution env

Classes:

* JobSpec is a "handler" for a job to be enqueued, the delay transforms
  JobSpec to actual jobs, stored through JobStore
* JobStore takes care of the side-effects in the database
* JobPayload is the recordset, args and kwargs tied to an environment
* Executor takes care of the execution of a job (previously mainly in
  the controller)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants