mirror of
https://github.com/apache/superset.git
synced 2024-09-12 08:39:45 -04:00
Fix misleading SQL Lab timeout error message (#3825)
This commit is contained in:
parent
330926c167
commit
be3da6396f
@ -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)
|
||||
|
Loading…
Reference in New Issue
Block a user