You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@superset.apache.org by gi...@git.apache.org on 2017/10/08 14:43:24 UTC

[GitHub] xrmx commented on issue #1260: Migrations for 0.11 hangs with posgresql

xrmx commented on issue #1260: Migrations for 0.11 hangs with posgresql 
URL: https://github.com/apache/incubator-superset/issues/1260#issuecomment-335011205
 
 
   @rhunwicks thanks for the analysis! Can we add the session cleanup in a overriden `add_permissions_menu` in security/sqla/manager.py? Like the following untested:
   
   ```
   diff --git a/flask_appbuilder/security/sqla/manager.py b/flask_appbuilder/security/sqla/manager.py
   index c75ba548..138914e1 100644
   --- a/flask_appbuilder/security/sqla/manager.py
   +++ b/flask_appbuilder/security/sqla/manager.py
   @@ -251,6 +251,10 @@ class SecurityManager(BaseSecurityManager):
                    log.error(c.LOGMSG_ERR_SEC_DEL_PERMISSION.format(str(e)))
                    self.get_session.rollback()
    
   +    def add_permissions_menu(self, view_menu_name):
   +        super(SecurityManager, self).add_permissions_menu(self, view_menu_name)
   +        self.get_session.close()
   +
        # ----------------------------------------------
        #       PRIMITIVES VIEW MENU
        #----------------------------------------------
   ```
 
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services