Skip to content

Commit

Permalink
add data_source name to the log
Browse files Browse the repository at this point in the history
it's more readable than data_source id
  • Loading branch information
zachliu committed Aug 13, 2024
1 parent 1b16269 commit f6eacfa
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions redash/tasks/queries/execution.py
Original file line number Diff line number Diff line change
Expand Up @@ -268,13 +268,14 @@ def _annotate_query(self, query_runner):

def _log_progress(self, state, data_length=0, run_time=0, error=None):
logger.info(
"job=execute_query state=%s query_hash=%s type=%s ds_id=%d "
"data_length=%s job_id=%s queue=%s query_id=%s username=%s "
"job=execute_query state=%s query_hash=%s type=%s ds_id=%d ds_name"
"=%s data_length=%s job_id=%s queue=%s query_id=%s username=%s "
"query_runtime=%.2f error=[%s]", # fmt: skip
state,
self.query_hash,
self.data_source.type,
self.data_source.id,
self.data_source.name,
data_length,
self.job.id,
self.metadata.get("Queue", "unknown"),
Expand Down

0 comments on commit f6eacfa

Please sign in to comment.