mirror of
https://github.com/valitydev/redash.git
synced 2024-11-07 01:25:16 +00:00
Run annotated queries.
This commit is contained in:
parent
6e0d1c613c
commit
f08ebf2256
@ -225,12 +225,17 @@ class Worker(threading.Thread):
|
||||
logging.warning("[%s][%s] tried to process finished job.", self.name, job)
|
||||
return
|
||||
|
||||
job.processing(os.getpid())
|
||||
pid = os.getpid()
|
||||
job.processing(pid)
|
||||
|
||||
logging.info("[%s][%s] running query...", self.name, job.id)
|
||||
start_time = time.time()
|
||||
self.set_title("running query %s" % job_id)
|
||||
data, error = self.query_runner(job.query)
|
||||
|
||||
annotated_query = "/* Pid: %s, Job Id: %s, Query hash: %s, Priority: %s */ %s" % \
|
||||
(pid, job.id, job.query_hash, job.priority, job.query)
|
||||
|
||||
data, error = self.query_runner(annotated_query)
|
||||
run_time = time.time() - start_time
|
||||
logging.info("[%s][%s] query finished... data length=%s, error=%s",
|
||||
self.name, job.id, data and len(data), error)
|
||||
|
Loading…
Reference in New Issue
Block a user