]> review.fuel-infra Code Review - openstack-build/neutron-build.git/commit
Only call get_engine().pool.dispose if _FACADE
authorKevin Benton <blak111@gmail.com>
Wed, 18 Mar 2015 11:13:11 +0000 (04:13 -0700)
committerKevin Benton <blak111@gmail.com>
Mon, 30 Mar 2015 16:58:09 +0000 (09:58 -0700)
commit34380df15b3e28d7bfa4ca3a5a11fcbbcb65e376
tree64c26aa4e79e97596c67cb3416cfab0b04e5abad
parent9debd891ff315cd94f88101e91728db29269b997
Only call get_engine().pool.dispose if _FACADE

Avoid calling neutron.db.api.get_engine().pool.dispose() if
an engine facade has not yet been created since there won't
be any connections to get rid of. Calling it on services
that do not use the DB (e.g. agents) unnecessarily creates
a database connection engine that will never be used.

Change-Id: I3dbad1bef5da7b3765898e7d539b4d119b89e73a
Closes-Bug: #1433536
neutron/agent/metadata_agent.py
neutron/db/api.py
neutron/service.py
neutron/tests/unit/agent/metadata/test_agent.py
neutron/tests/unit/test_wsgi.py
neutron/wsgi.py