Switch away from using Nailgun DB session
Since we try to provide Nailgun with finalized response instead of exceptions, it's DB session management doesn't know that session can be invalidated already and tries to commit. We'll just use Nailgun's DB connection string instead. Change-Id: Id8f240c4dd75736015fabdff1333dff41741fb19
This commit is contained in:
parent
c62ea00d30
commit
689e4ad254
|
@ -15,7 +15,7 @@ from __future__ import absolute_import
|
|||
import itertools
|
||||
import threading
|
||||
|
||||
from nailgun import db as nailgun_db
|
||||
from nailgun.db import sqlalchemy as nailgun_sa
|
||||
from nailgun import extensions
|
||||
import web
|
||||
|
||||
|
@ -69,8 +69,8 @@ class TB2WebPy(App2WebPy):
|
|||
def create_app(self):
|
||||
app = tb_app.build_app()
|
||||
tb_db.prefix_tables(tb_db, Extension.table_prefix())
|
||||
tb_db.db.session = nailgun_db.db
|
||||
app.config["PROPAGATE_EXCEPTIONS"] = True
|
||||
app.config["SQLALCHEMY_DATABASE_URI"] = nailgun_sa.db_str
|
||||
return app
|
||||
|
||||
|
||||
|
|
Loading…
Reference in New Issue