Skip to content

Commit 36339e6

Browse files
committed
[IMP] queue_job: add configuration options for
jobrunner_db_user, jobrunner_db_password
1 parent 5c1e723 commit 36339e6

1 file changed

Lines changed: 7 additions & 1 deletion

File tree

queue_job/jobrunner/runner.py

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,10 @@
3535
or ``False`` if unset.
3636
- ``ODOO_QUEUE_JOB_JOBRUNNER_DB_PORT=5432``, default ``db_port``
3737
or ``False`` if unset.
38+
- ``ODOO_QUEUE_JOB_JOBRUNNER_DB_USER=userdb``, default ``db_user``
39+
or ``False`` if unset.
40+
- ``ODOO_QUEUE_JOB_JOBRUNNER_DB_PASSWORD=passdb``, default ``db_password``
41+
or ``False`` if unset.
3842
3943
* Alternatively, configure the channels through the Odoo configuration
4044
file, like:
@@ -50,6 +54,8 @@
5054
http_auth_password = s3cr3t
5155
jobrunner_db_host = master-db
5256
jobrunner_db_port = 5432
57+
jobrunner_db_user = userdb
58+
jobrunner_db_password = passdb
5359
5460
* Or, if using ``anybox.recipe.odoo``, add this to your buildout configuration:
5561
@@ -187,7 +193,7 @@ def _odoo_now():
187193
def _connection_info_for(db_name):
188194
db_or_uri, connection_info = odoo.sql_db.connection_info_for(db_name)
189195

190-
for p in ("host", "port"):
196+
for p in ("host", "port", "user", "password"):
191197
cfg = os.environ.get(
192198
"ODOO_QUEUE_JOB_JOBRUNNER_DB_%s" % p.upper()
193199
) or queue_job_config.get("jobrunner_db_" + p)

0 commit comments

Comments
 (0)