Skip to content

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

Draft
guewen wants to merge 3 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 3 commits into
OCA:18.0from
guewen:18.0-job-executor

Conversation

@guewen

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
guewenforce-pushed the 18.0-job-executor branch from 9ca3275 to 5d8cd0cCompareJuly 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)
@guewen
guewenforce-pushed the 18.0-job-executor branch from 6bbe653 to 5e925aaCompareJuly 17, 2026 10:02
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

mod:queue_jobModule queue_jobseries:18.0

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants

@guewen@OCA-git-bot