Browse Source

Remove idle_timeout option

The idle_timeout parameter has been deprecated for two releases.
We can remove it.

Change-Id: Ibc0ffde81f97d9b32a48166ff52661f74c296b54
changes/63/714363/1
ZhongShengping 2 years ago
parent
commit
c812c3a322
  1. 15
      manifests/db.pp
  2. 3
      releasenotes/notes/remove_idle_timeout_option-81bb50a1292b535e.yaml

15
manifests/db.pp

@ -37,12 +37,6 @@
# (Optional) If set, use this value for pool_timeout with SQLAlchemy.
# Defaults to $::os_service_default
#
# DEPRECATED PARAMETERS
#
# [*database_idle_timeout*]
# Timeout when db connections should be reaped.
# Defaults to undef.
#
class trove::db (
$database_connection = 'sqlite:////var/lib/trove/trove.sqlite',
$database_connection_recycle_time = $::os_service_default,
@ -52,21 +46,14 @@ class trove::db (
$database_retry_interval = $::os_service_default,
$database_max_overflow = $::os_service_default,
$database_pool_timeout = $::os_service_default,
# DEPRECATED PARAMETERS
$database_idle_timeout = undef,
) {
include trove::deps
if $database_idle_timeout {
warning('The database_idle_timeout parameter is deprecated. Please use \
database_connection_recycle_time instead.')
}
# NOTE(spredzy): In order to keep backward compatibility we rely on the pick function
# to use trove::<myparam> if trove::db::<myparam> isn't specified.
$database_connection_real = pick($::trove::database_connection, $database_connection)
$database_connection_recycle_time_real = pick($::trove::database_idle_timeout, $database_idle_timeout, $database_connection_recycle_time)
$database_connection_recycle_time_real = pick($::trove::database_idle_timeout, $database_connection_recycle_time)
$database_min_pool_size_real = pick($::trove::database_min_pool_size, $database_min_pool_size)
$database_max_pool_size_real = pick($::trove::database_max_pool_size, $database_max_pool_size)
$database_max_retries_real = pick($::trove::database_max_retries, $database_max_retries)

3
releasenotes/notes/remove_idle_timeout_option-81bb50a1292b535e.yaml

@ -0,0 +1,3 @@
---
upgrade:
- Deprecated idle_timeout option has been removed.
Loading…
Cancel
Save