Skip to content

Commit

Permalink
Merge pull request #40 from acsone/add-db_maxconn_gevent-sbi
Browse files Browse the repository at this point in the history
Add DB_MAXCONN_GEVENT env var
  • Loading branch information
sbidoul authored Sep 23, 2024
2 parents 18d5958 + 9b79109 commit 4bd58a3
Show file tree
Hide file tree
Showing 10 changed files with 10 additions and 0 deletions.
1 change: 1 addition & 0 deletions README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -72,6 +72,7 @@ The following environment variables are used to generate the Odoo configuration
* ``DB_HOST``
* ``DB_REPLICA_HOST`` (>=18)
* ``DB_MAXCONN``
* ``DB_MAXCONN_GEVENT`` (>=17)
* ``DB_NAME``
* ``DB_PASSWORD``
* ``DB_PORT``
Expand Down
1 change: 1 addition & 0 deletions templates/17.0/answers.sh
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ declare -x DB_FILTER="${DB_FILTER:-^(${DB_NAME//,/|})$}"
declare -x LIST_DB="${LIST_DB:-False}"
declare -x ADMIN_PASSWD="${ADMIN_PASSWD:-}"
declare -x DB_MAXCONN="${DB_MAXCONN:-64}"
declare -x DB_MAXCONN_GEVENT="${DB_MAXCONN_GEVENT:-False}"
declare -x LIMIT_MEMORY_SOFT="${LIMIT_MEMORY_SOFT:-2147483648}"
declare -x LIMIT_MEMORY_HARD="${LIMIT_MEMORY_HARD:-2684354560}"
declare -x LIMIT_REQUEST="${LIMIT_REQUEST:-8192}"
Expand Down
1 change: 1 addition & 0 deletions templates/17.0/odoo.cfg.tmpl
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ dbfilter = ${DB_FILTER}
list_db = ${LIST_DB}
admin_passwd = ${ADMIN_PASSWD}
db_maxconn = ${DB_MAXCONN}
db_maxconn_gevent = ${DB_MAXCONN_GEVENT}
limit_memory_soft = ${LIMIT_MEMORY_SOFT}
limit_memory_hard = ${LIMIT_MEMORY_HARD}
limit_request = ${LIMIT_REQUEST}
Expand Down
1 change: 1 addition & 0 deletions templates/18.0/answers.sh
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ declare -x DB_FILTER="${DB_FILTER:-^(${DB_NAME//,/|})$}"
declare -x LIST_DB="${LIST_DB:-False}"
declare -x ADMIN_PASSWD="${ADMIN_PASSWD:-}"
declare -x DB_MAXCONN="${DB_MAXCONN:-64}"
declare -x DB_MAXCONN_GEVENT="${DB_MAXCONN_GEVENT:-False}"
declare -x LIMIT_MEMORY_SOFT="${LIMIT_MEMORY_SOFT:-2147483648}"
declare -x LIMIT_MEMORY_SOFT_GEVENT="${LIMIT_MEMORY_SOFT_GEVENT:-False}"
declare -x LIMIT_MEMORY_HARD="${LIMIT_MEMORY_HARD:-2684354560}"
Expand Down
1 change: 1 addition & 0 deletions templates/18.0/odoo.cfg.tmpl
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ dbfilter = ${DB_FILTER}
list_db = ${LIST_DB}
admin_passwd = ${ADMIN_PASSWD}
db_maxconn = ${DB_MAXCONN}
db_maxconn_gevent = ${DB_MAXCONN_GEVENT}
limit_memory_soft = ${LIMIT_MEMORY_SOFT}
limit_memory_soft_gevent = ${LIMIT_MEMORY_SOFT_GEVENT}
limit_memory_hard = ${LIMIT_MEMORY_HARD}
Expand Down
1 change: 1 addition & 0 deletions tests/data/expected-default-odoo-cfg-17.0.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ dbfilter = ^(odoodb)$
list_db = False
admin_passwd =
db_maxconn = 64
db_maxconn_gevent = False
limit_memory_soft = 2147483648
limit_memory_hard = 2684354560
limit_request = 8192
Expand Down
1 change: 1 addition & 0 deletions tests/data/expected-default-odoo-cfg-18.0.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ dbfilter = ^(odoodb)$
list_db = False
admin_passwd =
db_maxconn = 64
db_maxconn_gevent = False
limit_memory_soft = 2147483648
limit_memory_soft_gevent = False
limit_memory_hard = 2684354560
Expand Down
1 change: 1 addition & 0 deletions tests/data/expected-odoo-cfg-17.0.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ dbfilter = *DB_FILTER*
list_db = *LIST_DB*
admin_passwd = *ADMIN_PASSWD*
db_maxconn = *DB_MAXCONN*
db_maxconn_gevent = *DB_MAXCONN_GEVENT*
limit_memory_soft = *LIMIT_MEMORY_SOFT*
limit_memory_hard = *LIMIT_MEMORY_HARD*
limit_request = *LIMIT_REQUEST*
Expand Down
1 change: 1 addition & 0 deletions tests/data/expected-odoo-cfg-18.0.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ dbfilter = *DB_FILTER*
list_db = *LIST_DB*
admin_passwd = *ADMIN_PASSWD*
db_maxconn = *DB_MAXCONN*
db_maxconn_gevent = *DB_MAXCONN_GEVENT*
limit_memory_soft = *LIMIT_MEMORY_SOFT*
limit_memory_soft_gevent = *LIMIT_MEMORY_SOFT_GEVENT*
limit_memory_hard = *LIMIT_MEMORY_HARD*
Expand Down
1 change: 1 addition & 0 deletions tests/test_run.py
Original file line number Diff line number Diff line change
Expand Up @@ -129,6 +129,7 @@ def test_odoo_cfg_env_vars():
"DB_HOST",
"DB_REPLICA_HOST",
"DB_MAXCONN",
"DB_MAXCONN_GEVENT",
"DB_NAME",
"DB_PASSWORD",
"DB_PORT",
Expand Down

0 comments on commit 4bd58a3

Please sign in to comment.