You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@superset.apache.org by hu...@apache.org on 2023/03/29 21:47:50 UTC

[superset] branch add-backoff-ssh-connection created (now 057d7458a3)

This is an automated email from the ASF dual-hosted git repository.

hugh pushed a change to branch add-backoff-ssh-connection
in repository https://gitbox.apache.org/repos/asf/superset.git


      at 057d7458a3 add backoff

This branch includes the following new commits:

     new 057d7458a3 add backoff

The 1 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails.  The revisions
listed as "add" were already present in the repository and have only
been added to this reference.



[superset] 01/01: add backoff

Posted by hu...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

hugh pushed a commit to branch add-backoff-ssh-connection
in repository https://gitbox.apache.org/repos/asf/superset.git

commit 057d7458a393c6fb75309e47539e663be9d89b36
Author: hughhhh <hu...@gmail.com>
AuthorDate: Wed Mar 29 17:47:25 2023 -0400

    add backoff
---
 superset/models/core.py | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/superset/models/core.py b/superset/models/core.py
index d7a38cdc03..9914f64917 100755
--- a/superset/models/core.py
+++ b/superset/models/core.py
@@ -20,6 +20,8 @@ import enum
 import json
 import logging
 import textwrap
+import backoff
+import sshtunnel
 from ast import literal_eval
 from contextlib import closing, contextmanager, nullcontext
 from copy import deepcopy
@@ -377,6 +379,7 @@ class Database(
             else None
         )
 
+    @backoff.on_exception(backoff.expo, sshtunnel.BaseSSHTunnelForwarderError, factor=10, base=2, max_tries=5)
     @contextmanager
     def get_sqla_engine_with_context(
         self,