Skip to content

Commit

Permalink
avoid logging job parameters (#4311)
Browse files Browse the repository at this point in the history
  • Loading branch information
Omer Lachish authored and arikfr committed Nov 27, 2019
1 parent c612bba commit 80f3ec1
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion redash/cli/rq.py
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ def worker(queues):
queues = ['periodic', 'emails', 'default', 'schemas']

with Connection(rq_redis_connection):
w = Worker(queues)
w = Worker(queues, log_job_description=False)
w.work()


Expand Down
2 changes: 1 addition & 1 deletion redash/settings/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -215,7 +215,7 @@
'task_id=%(task_id)s %(message)s')))
RQ_WORKER_JOB_LOG_FORMAT = os.environ.get("REDASH_RQ_WORKER_JOB_LOG_FORMAT",
(LOG_PREFIX + '[%(asctime)s][PID:%(process)d][%(levelname)s][%(name)s] '
'job.description=%(job_description)s '
'job.func_name=%(job_func_name)s '
'job.id=%(job_id)s %(message)s'))

# Mail settings:
Expand Down
2 changes: 1 addition & 1 deletion redash/worker.py
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ def filter(self, record):
current_job = get_current_job()

record.job_id = current_job.id if current_job else ''
record.job_description = current_job.description if current_job else ''
record.job_func_name = current_job.func_name if current_job else ''

return True

Expand Down

0 comments on commit 80f3ec1

Please sign in to comment.