From 89ac81c10ab8e1ea170ef124ff42c93b18f0ae64 Mon Sep 17 00:00:00 2001 From: David Moreau Simard Date: Sun, 8 Apr 2018 16:10:11 -0400 Subject: [PATCH] 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 --- ara/wsgi_sqlite.py | 1 + 1 file changed, 1 insertion(+) diff --git a/ara/wsgi_sqlite.py b/ara/wsgi_sqlite.py index f5f6a322..6cf08beb 100644 --- a/ara/wsgi_sqlite.py +++ b/ara/wsgi_sqlite.py @@ -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: