Merge "Change order of init _facade and osprofiler"

This commit is contained in:
Jenkins 2017-01-20 11:09:12 +00:00 committed by Gerrit Code Review
commit 1aa34ca14f
1 changed files with 1 additions and 1 deletions

View File

@ -71,12 +71,12 @@ def get_facade():
# to talk to each other, however one needs to be added to oslo.db
# to allow access to the Engine once constructed.
db_context.configure(**CONF.database)
_facade = db_context.get_legacy_facade()
if CONF.profiler.enabled:
if CONF.profiler.trace_sqlalchemy:
osprofiler.sqlalchemy.add_tracing(sqlalchemy,
_facade.get_engine(),
"db")
_facade = db_context.get_legacy_facade()
return _facade