wsgi_sqlite: Make sure we're setting the sqlite database URL

When sharing an application pool (cache/threads/processes), it seems
like the database path would not get updated when only using the
environment variables.

Change-Id: I4568a68d03066ac8acb75a9269e0d4374d2c7eb2
This commit is contained in:
David Moreau Simard 2018-04-08 16:10:11 -04:00
parent 259d3bed08
commit 89ac81c10a
No known key found for this signature in database
GPG Key ID: 33A07694CBB71ECC
1 changed files with 1 additions and 0 deletions

View File

@ -134,6 +134,7 @@ def application(environ, start_response):
from ara.webapp import create_app
try:
app = create_app()
app.config['SQLALCHEMY_DATABASE_URI'] = 'sqlite:///{}'.format(database)
app.config['APPLICATION_ROOT'] = match.group('path')
return app(environ, start_response)
except Exception as e: