Skip to content

Commit

Permalink
fix sqllab logging (apache#5862)
Browse files Browse the repository at this point in the history
  • Loading branch information
timifasubaa authored and betodealmeida committed Oct 12, 2018
1 parent 3f3b543 commit c715a43
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion superset/sql_lab.py
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
2 changes: 1 addition & 1 deletion superset/views/core.py
Original file line number Diff line number Diff line change
Expand Up @@ -2338,7 +2338,7 @@ def results(self, key):
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(
Expand Down

0 comments on commit c715a43

Please sign in to comment.