Reference new get_engine() method from wsgi.py

wsgi.py referenced get_engine in neutron.openstack.common.db.sqlalchemy.session.
This method was removed from that file in commit 53609f29f3
change-id I0e1d86878d3eb924b01e04dced0f90b4e57757d8. This patch references the
replacement method added to neutron.db.api.

Closes-Bug: #1314850
Change-Id: Ifd4db5f49e2aaebc67eccb8bdcef8eea54983112
This commit is contained in:
Kevin Benton 2014-04-30 18:58:05 -07:00
parent 48647fd42f
commit 07a130be1a

View File

@ -39,7 +39,7 @@ import webob.exc
from neutron.common import constants from neutron.common import constants
from neutron.common import exceptions as exception from neutron.common import exceptions as exception
from neutron import context from neutron import context
from neutron.openstack.common.db.sqlalchemy import session from neutron.db import api
from neutron.openstack.common import excutils from neutron.openstack.common import excutils
from neutron.openstack.common import gettextutils from neutron.openstack.common import gettextutils
from neutron.openstack.common import jsonutils from neutron.openstack.common import jsonutils
@ -95,7 +95,7 @@ class WorkerService(object):
# We may have just forked from parent process. A quick disposal of the # We may have just forked from parent process. A quick disposal of the
# existing sql connections avoids producting 500 errors later when they # existing sql connections avoids producting 500 errors later when they
# are discovered to be broken. # are discovered to be broken.
session.get_engine(sqlite_fk=True).pool.dispose() api.get_engine().pool.dispose()
self._server = self._service.pool.spawn(self._service._run, self._server = self._service.pool.spawn(self._service._run,
self._application, self._application,
self._service._socket) self._service._socket)