[18.0][ADD] queue_job: per DB channel managers with UI configuration and hot reload - #962
Draft
guewen wants to merge 5 commits into
Draft
[18.0][ADD] queue_job: per DB channel managers with UI configuration and hot reload#962guewen wants to merge 5 commits into
guewen wants to merge 5 commits into
Conversation
Contributor
|
Hi @sbidoul, |
Not used at this point by the jobrunner, but the changes on channels trigger a notify to the jobrunner.
guewen
force-pushed
the
18.0-queue-job-channel-config
branch
3 times, most recently
from
August 18, 2026 10:35
688eee4 to
9b9e3fd
Compare
guewen
force-pushed
the
18.0-queue-job-channel-config
branch
from
August 18, 2026 12:02
9b9e3fd to
934ccb4
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
#765 (comment)
With this in the config file, the job runner uses the static server-side configuration as before, with no hot-reload (single, shared channel manager):
With this in the config file, the job runner uses the channels configured in the database (the job runner builds one channel manager per database):
When capacity or other options of a channel (or channels are created/deleted, paused) change, the channel manager for the concerned database is hot reloaded.
Capacity can be constrained by database:
Or with patterns
When
db_max_capacityis not configured, each database gets a max capacity of the globalmax_capacity.When there is more jobs pending than
max_capacityacross the databases, a round-robin allows each database to enqueue jobs in turns.The
channelsoption for server-side configuration takes precedence over the new configuration.Using this, I can, for instance
Migration path
Since the server-side configuration (
ODOO_QUEUE_JOB_CHANNELSorchannelsin config file) is used by default, updating the addon has no effect. It allows to configure the channels capacity and other options on the UI / by script of the databases, then the server-side configuration can be replaced by the parametersmax_capacityanddb_max_capacity(or their environment variables counterparts).