Return-Path: X-Original-To: archive-asf-public-internal@cust-asf2.ponee.io Delivered-To: archive-asf-public-internal@cust-asf2.ponee.io Received: from cust-asf.ponee.io (cust-asf.ponee.io [163.172.22.183]) by cust-asf2.ponee.io (Postfix) with ESMTP id 21B3E200D5E for ; Fri, 10 Nov 2017 04:09:22 +0100 (CET) Received: by cust-asf.ponee.io (Postfix) id 203E4160C02; Fri, 10 Nov 2017 03:09:22 +0000 (UTC) Delivered-To: archive-asf-public@cust-asf.ponee.io Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by cust-asf.ponee.io (Postfix) with SMTP id 6EBE2160BEF for ; Fri, 10 Nov 2017 04:09:21 +0100 (CET) Received: (qmail 6205 invoked by uid 500); 10 Nov 2017 03:09:19 -0000 Mailing-List: contact commits-help@superset.incubator.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@superset.incubator.apache.org Delivered-To: mailing list commits@superset.incubator.apache.org Received: (qmail 6183 invoked by uid 99); 10 Nov 2017 03:09:18 -0000 Received: from ec2-52-202-80-70.compute-1.amazonaws.com (HELO gitbox.apache.org) (52.202.80.70) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 10 Nov 2017 03:09:18 +0000 Received: by gitbox.apache.org (ASF Mail Server at gitbox.apache.org, from userid 33) id 5D9C4850FA; Fri, 10 Nov 2017 03:09:18 +0000 (UTC) Date: Fri, 10 Nov 2017 03:09:18 +0000 To: "commits@superset.apache.org" Subject: [incubator-superset] branch master updated: Fix misleading SQL Lab timeout error message (#3825) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit Message-ID: <151028335823.13343.3706671645414406767@gitbox.apache.org> From: graceguo@apache.org X-Git-Host: gitbox.apache.org X-Git-Repo: incubator-superset X-Git-Refname: refs/heads/master X-Git-Reftype: branch X-Git-Oldrev: 330926c167d93f96598899ed175af7b74e5ebd3a X-Git-Newrev: be3da6396fabeec6c580b9e5ac13670c20d9b9ae X-Git-Rev: be3da6396fabeec6c580b9e5ac13670c20d9b9ae X-Git-NotificationType: ref_changed_plus_diff X-Git-Multimail-Version: 1.5.dev Auto-Submitted: auto-generated archived-at: Fri, 10 Nov 2017 03:09:22 -0000 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 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" '].