Add pool_timeout option
Add pool_timeout option to configure this value for pool_timeout with SQLAlchemy. Change-Id: Ib2413bc9da8eb50e310ca1f1e99c5ea0e708d570 Closes-Bug: #1757581
This commit is contained in:
parent
09de2784ee
commit
064ecaf4be
@ -33,6 +33,10 @@
|
||||
# If set, use this value for max_overflow with sqlalchemy.
|
||||
# (Optional) Defaults to 20.
|
||||
#
|
||||
# [*database_pool_timeout*]
|
||||
# (Optional) If set, use this value for pool_timeout with SQLAlchemy.
|
||||
# Defaults to $::os_service_default
|
||||
#
|
||||
class trove::db (
|
||||
$database_connection = 'sqlite:////var/lib/trove/trove.sqlite',
|
||||
$database_idle_timeout = $::os_service_default,
|
||||
@ -41,6 +45,7 @@ class trove::db (
|
||||
$database_max_retries = $::os_service_default,
|
||||
$database_retry_interval = $::os_service_default,
|
||||
$database_max_overflow = $::os_service_default,
|
||||
$database_pool_timeout = $::os_service_default,
|
||||
) {
|
||||
|
||||
include ::trove::deps
|
||||
@ -65,6 +70,7 @@ class trove::db (
|
||||
max_pool_size => $database_max_pool_size_real,
|
||||
max_retries => $database_max_retries_real,
|
||||
retry_interval => $database_retry_interval_real,
|
||||
max_overflow => $database_max_overflow_real
|
||||
max_overflow => $database_max_overflow_real,
|
||||
pool_timeout => $database_pool_timeout,
|
||||
}
|
||||
}
|
||||
|
@ -0,0 +1,5 @@
|
||||
---
|
||||
features:
|
||||
- |
|
||||
Adds the pool_timeout option for configuring oslo.db. This will
|
||||
configure this value for pool_timeout with SQLAlchemy.
|
@ -14,6 +14,7 @@ describe 'trove::db' do
|
||||
:max_retries => '<SERVICE DEFAULT>',
|
||||
:retry_interval => '<SERVICE DEFAULT>',
|
||||
:max_overflow => '<SERVICE DEFAULT>',
|
||||
:pool_timeout => '<SERVICE DEFAULT>',
|
||||
)}
|
||||
end
|
||||
|
||||
@ -25,6 +26,7 @@ describe 'trove::db' do
|
||||
:database_max_pool_size => '21',
|
||||
:database_max_retries => '11',
|
||||
:database_max_overflow => '21',
|
||||
:database_pool_timeout => '21',
|
||||
:database_retry_interval => '11', }
|
||||
end
|
||||
|
||||
@ -36,6 +38,7 @@ describe 'trove::db' do
|
||||
:max_retries => '11',
|
||||
:retry_interval => '11',
|
||||
:max_overflow => '21',
|
||||
:pool_timeout => '21',
|
||||
)}
|
||||
end
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user