Merge "Deprecate idle_timeout in api_database"

This commit is contained in:
Jenkins 2017-09-25 23:19:19 +00:00 committed by Gerrit Code Review
commit 40d59415dd
2 changed files with 3 additions and 2 deletions

View File

@ -63,8 +63,9 @@ api_db_opts = [
cfg.StrOpt('mysql_sql_mode',
default='TRADITIONAL',
help=''),
cfg.IntOpt('idle_timeout',
cfg.IntOpt('connection_recycle_time',
default=3600,
deprecated_name='idle_timeout',
help=''),
# TODO(markus_z): We should probably default this to 5 to not rely on the
# SQLAlchemy default. Otherwise we wouldn't provide a stable default.

View File

@ -87,7 +87,7 @@ def _get_db_conf(conf_group, connection=None):
__autocommit=True,
expire_on_commit=False,
mysql_sql_mode=conf_group.mysql_sql_mode,
idle_timeout=conf_group.idle_timeout,
connection_recycle_time=conf_group.connection_recycle_time,
connection_debug=conf_group.connection_debug,
max_pool_size=conf_group.max_pool_size,
max_overflow=conf_group.max_overflow,