You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@superset.apache.org by jo...@apache.org on 2019/07/01 17:02:47 UTC

[incubator-superset] branch master updated: [SQL Lab] Add hard time limit fallback for async queries (#7783)

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

johnbodley 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 fc6a53e  [SQL Lab] Add hard time limit fallback for async queries (#7783)
fc6a53e is described below

commit fc6a53eda957ec0d693b23041dc897b3298ac956
Author: Erik Ritter <er...@airbnb.com>
AuthorDate: Mon Jul 1 10:02:37 2019 -0700

    [SQL Lab] Add hard time limit fallback for async queries (#7783)
---
 superset/sql_lab.py | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)

diff --git a/superset/sql_lab.py b/superset/sql_lab.py
index c0b778a..8d8aa16 100644
--- a/superset/sql_lab.py
+++ b/superset/sql_lab.py
@@ -40,6 +40,7 @@ from superset.utils.decorators import stats_timing
 config = app.config
 stats_logger = config.get("STATS_LOGGER")
 SQLLAB_TIMEOUT = config.get("SQLLAB_ASYNC_TIME_LIMIT_SEC", 600)
+SQLLAB_HARD_TIMEOUT = SQLLAB_TIMEOUT + 60
 log_query = config.get("QUERY_LOGGER")
 
 
@@ -114,7 +115,10 @@ def session_scope(nullpool):
 
 
 @celery_app.task(
-    name="sql_lab.get_sql_results", bind=True, soft_time_limit=SQLLAB_TIMEOUT
+    name="sql_lab.get_sql_results",
+    bind=True,
+    time_limit=SQLLAB_HARD_TIMEOUT,
+    soft_time_limit=SQLLAB_TIMEOUT,
 )
 def get_sql_results(
     ctask,