superset-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From maximebeauche...@apache.org
Subject [incubator-superset] branch master updated: Quick fix to address deadlock issue (#7434)
Date Thu, 02 May 2019 19:45:29 GMT
This is an automated email from the ASF dual-hosted git repository.

maximebeauchemin pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/incubator-superset.git


The following commit(s) were added to refs/heads/master by this push:
     new c8bb7e0  Quick fix to address deadlock issue (#7434)
c8bb7e0 is described below

commit c8bb7e0fe406e4afe8fb7f2655d4f350ece528dc
Author: Craig Rueda <craig@craigrueda.com>
AuthorDate: Thu May 2 12:45:15 2019 -0700

    Quick fix to address deadlock issue (#7434)
---
 superset/__init__.py | 15 ++++++++-------
 1 file changed, 8 insertions(+), 7 deletions(-)

diff --git a/superset/__init__.py b/superset/__init__.py
index c405c01..8f8936d 100644
--- a/superset/__init__.py
+++ b/superset/__init__.py
@@ -195,13 +195,14 @@ if not issubclass(custom_sm, SupersetSecurityManager):
          not FAB's security manager.
          See [4565] in UPDATING.md""")
 
-appbuilder = AppBuilder(
-    app,
-    db.session,
-    base_template='superset/base.html',
-    indexview=MyIndexView,
-    security_manager_class=custom_sm,
-)
+with app.app_context():
+    appbuilder = AppBuilder(
+        app,
+        db.session,
+        base_template='superset/base.html',
+        indexview=MyIndexView,
+        security_manager_class=custom_sm,
+    )
 
 security_manager = appbuilder.sm
 


Mime
View raw message