superset-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From michel...@apache.org
Subject [incubator-superset] 01/08: Quick fix to address deadlock issue (#7434)
Date Wed, 19 Jun 2019 22:36:08 GMT
This is an automated email from the ASF dual-hosted git repository.

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

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

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

diff --git a/superset/__init__.py b/superset/__init__.py
index c995c2f..6971dc9 100644
--- a/superset/__init__.py
+++ b/superset/__init__.py
@@ -196,13 +196,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