mirror of
https://github.com/apache/superset.git
synced 2026-04-18 15:44:57 +00:00
fix sqllab logging (#5862)
This commit is contained in:
@@ -100,7 +100,7 @@ def execute_sql(
|
||||
user_name=None, session=None, start_time=None,
|
||||
):
|
||||
"""Executes the sql query returns the results."""
|
||||
if store_results:
|
||||
if store_results and start_time:
|
||||
# only asynchronous queries
|
||||
stats_logger.timing(
|
||||
'sqllab.query.time_pending', utils.now_as_float() - start_time)
|
||||
|
||||
@@ -2338,7 +2338,7 @@ class Superset(BaseSupersetView):
|
||||
blob = results_backend.get(key)
|
||||
stats_logger.timing(
|
||||
'sqllab.query.results_backend_read',
|
||||
read_from_results_backend_start - utils.now_as_float(),
|
||||
utils.now_as_float() - read_from_results_backend_start,
|
||||
)
|
||||
if not blob:
|
||||
return json_error_response(
|
||||
|
||||
Reference in New Issue
Block a user