Skip to content

Commit

Permalink
chore: add log for ssh tunnel information (apache#24058)
Browse files Browse the repository at this point in the history
(cherry picked from commit de96372)
  • Loading branch information
hughhhh authored and sadpandajoe committed May 15, 2023
1 parent b82150f commit 43eb8b4
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion superset/models/core.py
Original file line number Diff line number Diff line change
Expand Up @@ -404,7 +404,12 @@ def get_sqla_engine_with_context(
)

with engine_context as server_context:
if ssh_tunnel:
if ssh_tunnel and server_context:
logger.info(
"[SSH] Successfully create tunnel at %s: %s",
server_context.local_bind_address,
server_context.local_bind_port,
)
sqlalchemy_uri = ssh_manager_factory.instance.build_sqla_url(
sqlalchemy_uri, server_context
)
Expand Down

0 comments on commit 43eb8b4

Please sign in to comment.