Cédric Krier pushed to branch branch/default at Tryton / Tryton
Commits:
5302de55 by Cédric Krier at 2023-07-12T09:16:08+02:00
Use configured minimal connection also for default database name
When the default database name is also a Tryton database, we must keep the
minimal connection in the pool instead of of 0.
Closes #12387
- - - - -
1 changed file:
- trytond/trytond/backend/postgresql/database.py
Changes:
=====================================
trytond/trytond/backend/postgresql/database.py
=====================================
@@ -221,10 +221,6 @@
if name in databases:
inst = databases[name]
else:
- if name == _default_name:
- minconn = 0
- else:
- minconn = _minconn
inst = DatabaseInterface.__new__(cls, name=name)
try:
inst._connpool = ThreadedConnectionPool(
@@ -228,7 +224,7 @@
inst = DatabaseInterface.__new__(cls, name=name)
try:
inst._connpool = ThreadedConnectionPool(
- minconn, _maxconn, **cls._connection_params(name),
+ _minconn, _maxconn, **cls._connection_params(name),
cursor_factory=LoggingCursor)
except Exception:
logger.error(
View it on Heptapod:
https://foss.heptapod.net/tryton/tryton/-/commit/5302de556e4a352294b6091b0d81b5eb40cd3347
--
View it on Heptapod:
https://foss.heptapod.net/tryton/tryton/-/commit/5302de556e4a352294b6091b0d81b5eb40cd3347
You're receiving this email because of your account on foss.heptapod.net.