Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix sqllab logging #5862

Merged
merged 1 commit into from
Sep 12, 2018
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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