You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@superset.apache.org by ma...@apache.org on 2018/05/07 20:49:44 UTC
[incubator-superset] branch master updated: [sql lab] handle query
stop race condition (#4928)
This is an automated email from the ASF dual-hosted git repository.
maximebeauchemin 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 415d1c0 [sql lab] handle query stop race condition (#4928)
415d1c0 is described below
commit 415d1c092b504d66f530554adc7df723414c5b56
Author: Maxime Beauchemin <ma...@gmail.com>
AuthorDate: Mon May 7 13:49:42 2018 -0700
[sql lab] handle query stop race condition (#4928)
fixes https://github.com/apache/incubator-superset/issues/4926
In rare cases where the query is stopped before it is started, SQL Lab
returns an unexpected string payload instead of a normal dictionary.
This aligns the process to handle the error in a homogeneous fashion.
---
superset/sql_lab.py | 8 +-------
1 file changed, 1 insertion(+), 7 deletions(-)
diff --git a/superset/sql_lab.py b/superset/sql_lab.py
index b52e9a9..750da1f 100644
--- a/superset/sql_lab.py
+++ b/superset/sql_lab.py
@@ -232,13 +232,7 @@ def execute_sql(
conn.close()
if query.status == utils.QueryStatus.STOPPED:
- return json.dumps(
- {
- 'query_id': query.id,
- 'status': query.status,
- 'query': query.to_dict(),
- },
- default=utils.json_iso_dttm_ser)
+ return handle_error('The query has been stopped')
cdf = convert_results_to_df(cursor_description, data)
--
To stop receiving notification emails like this one, please contact
maximebeauchemin@apache.org.