You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@superset.apache.org by GitBox <gi...@apache.org> on 2022/10/20 22:50:41 UTC

[GitHub] [superset] betodealmeida commented on a diff in pull request #21790: feat: create function for get_sqla_engine with context

betodealmeida commented on code in PR #21790:
URL: https://github.com/apache/superset/pull/21790#discussion_r1001194542


##########
superset/models/core.py:
##########
@@ -362,6 +362,18 @@ def get_effective_user(self, object_url: URL) -> Optional[str]:
             else None
         )
 
+    @contextmanager
+    def get_sqla_engine_with_context(

Review Comment:
   For now there's no difference, but Hugh is planning to add support for SSH tunneling, which would require a setup phase before the engine is created, and a teardown after. In order for the SSH tunnel to work everywhere we will need to replace all existing calls with the new context manager.



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org