Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[14.0][FIX] queue_job: support for multi-db environments #416

Closed
wants to merge 1 commit into from

Conversation

RLeeOSI
Copy link

@RLeeOSI RLeeOSI commented Mar 25, 2022

This change improves functionality in environments with multiple databases in the postgres cluster. Some environments have hidden databases, and may use list_db = False in favor of the db_filter config parameter. In these cases, exp_list will return an AccessError. Or, some environments may have multiple databases used by multiple instances of Odoo, managed by a load balancer. It's possible that not all DBs will have the queue_job module installed. Sometimes, we will want the job runner to work on a limited set of DBs.

This change adds the option of an environment variable, ODOO_QUEUE_JOB_DB_NAME, or a config parameter in the [queue] section, jobrunner_db_name. This takes a comma separated list of DB names, just like db_name does. If the variable/parameter is not set, it defaults to db_name (the previous functionality).

Related:
#379 - Another fix for 12.0, solves the same problem when list_db=False
#58 - This resolves the issue

@ska-ibees
Copy link

This change improves functionality in environments with multiple databases in the postgres cluster. Some environments have hidden databases, and may use list_db = False in favor of the db_filter config parameter. In these cases, exp_list will return an AccessError. Or, some environments may have multiple databases used by multiple instances of Odoo, managed by a load balancer. It's possible that not all DBs will have the queue_job module installed. Sometimes, we will want the job runner to work on a limited set of DBs.

This change adds the option of an environment variable, ODOO_QUEUE_JOB_DB_NAME, or a config parameter in the [queue] section, jobrunner_db_name. This takes a comma separated list of DB names, just like db_name does. If the variable/parameter is not set, it defaults to db_name (the previous functionality).

Related: #379 - Another fix for 12.0, solves the same problem when list_db=False #58 - This resolves the issue

Can't thank enough for this... have been struggling to handle multi db setup... @RLeeOSI

@github-actions
Copy link

github-actions bot commented Sep 4, 2022

There hasn't been any activity on this pull request in the past 4 months, so it has been marked as stale and it will be closed automatically if no further activity occurs in the next 30 days.
If you want this PR to never become stale, please ask a PSC member to apply the "no stale" label.

@github-actions github-actions bot added the stale PR/Issue without recent activity, it'll be soon closed automatically. label Sep 4, 2022
@github-actions github-actions bot closed this Oct 9, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
stale PR/Issue without recent activity, it'll be soon closed automatically.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants