superset-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From grace...@apache.org
Subject [incubator-superset] branch master updated: Fix misleading SQL Lab timeout error message (#3825)
Date Fri, 10 Nov 2017 03:09:18 GMT
This is an automated email from the ASF dual-hosted git repository.

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


The following commit(s) were added to refs/heads/master by this push:
     new be3da63  Fix misleading SQL Lab timeout error message (#3825)
be3da63 is described below

commit be3da6396fabeec6c580b9e5ac13670c20d9b9ae
Author: Maxime Beauchemin <maximebeauchemin@gmail.com>
AuthorDate: Thu Nov 9 19:09:16 2017 -0800

    Fix misleading SQL Lab timeout error message (#3825)
---
 superset/views/core.py | 14 ++++++--------
 1 file changed, 6 insertions(+), 8 deletions(-)

diff --git a/superset/views/core.py b/superset/views/core.py
index 0031150..73daeac 100755
--- a/superset/views/core.py
+++ b/superset/views/core.py
@@ -2138,14 +2138,12 @@ class Superset(BaseSupersetView):
 
         # Sync request.
         try:
-            SQLLAB_TIMEOUT = config.get("SQLLAB_TIMEOUT")
-            with utils.timeout(
-                    seconds=SQLLAB_TIMEOUT,
-                    error_message=(
-                        "The query exceeded the {SQLLAB_TIMEOUT} seconds "
-                        "timeout. You may want to run your query as a "
-                        "`CREATE TABLE AS` to prevent timeouts."
-                    ).format(**locals())):
+            timeout = config.get("SQLLAB_TIMEOUT")
+            timeout_msg = (
+                "The query exceeded the {timeout} seconds "
+                "timeout.").format(**locals())
+            with utils.timeout(seconds=timeout,
+                               error_message=timeout_msg):
                 # pylint: disable=no-value-for-parameter
                 data = sql_lab.get_sql_results(
                     query_id=query_id, return_results=True)

-- 
To stop receiving notification emails like this one, please contact
['"commits@superset.apache.org" <commits@superset.apache.org>'].

Mime
View raw message