queue icon indicating copy to clipboard operation
queue copied to clipboard

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

Open RLeeOSI opened this issue 2 years ago • 1 comments

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

RLeeOSI avatar Mar 25 '22 03:03 RLeeOSI

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

ska-ibees avatar May 02 '22 02:05 ska-ibees

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[bot] avatar Sep 04 '22 12:09 github-actions[bot]