fix sqllab logging (#5862)

This commit is contained in:
timifasubaa 2018-09-11 17:23:44 -07:00 committed by GitHub
parent 962eb0860c
commit c82cea3c8d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 2 additions and 2 deletions

View File

@ -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)

View File

@ -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(