Merge pull request #2985 from coreos-inc/fix-pooled-args-non-pooled
Remove unsupported DB connection arguments for non-pooled DB handler
This commit is contained in:
commit
acf41ca1c8
1 changed files with 2 additions and 0 deletions
|
@ -282,6 +282,8 @@ def _db_from_url(url, db_kwargs, connect_timeout=DEFAULT_DB_CONNECT_TIMEOUT):
|
||||||
parsed_url.drivername, db_kwargs['stale_timeout'], db_kwargs['max_connections'])
|
parsed_url.drivername, db_kwargs['stale_timeout'], db_kwargs['max_connections'])
|
||||||
else:
|
else:
|
||||||
logger.info('Connection pooling disabled for %s', parsed_url.drivername)
|
logger.info('Connection pooling disabled for %s', parsed_url.drivername)
|
||||||
|
db_kwargs.pop('stale_timeout', None)
|
||||||
|
db_kwargs.pop('max_connections', None)
|
||||||
|
|
||||||
wrapped_driver = _wrap_for_retry(driver)
|
wrapped_driver = _wrap_for_retry(driver)
|
||||||
return wrapped_driver(parsed_url.database, **db_kwargs)
|
return wrapped_driver(parsed_url.database, **db_kwargs)
|
||||||
|
|
Reference in a new issue