From 8b30ed5b7a87423a8737d251ee31b0e7f541b539 Mon Sep 17 00:00:00 2001 From: David Taylor Date: Tue, 5 Mar 2019 17:44:49 +0000 Subject: [PATCH] DEV: Serialize the job parameters in sidekiq logs Otherwise this can lead to some very large data structures when processing the logs later --- app/jobs/base.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/jobs/base.rb b/app/jobs/base.rb index 474319413d2..515a3c8ab10 100644 --- a/app/jobs/base.rb +++ b/app/jobs/base.rb @@ -26,7 +26,7 @@ module Jobs @data["database"] = db # DB name - multisite db name it ran on @data["job_name"] = job_class.name # Job Name - eg: Jobs::AboutStats @data["job_type"] = job_class.try(:scheduled?) ? "scheduled" : "regular" # Job Type - either s for scheduled or r for regular - @data["opts"] = opts # Params - json encoded params for the job + @data["opts"] = opts.to_json # Params - json encoded params for the job @data["status"] = 'pending' @start_timestamp = Process.clock_gettime(Process::CLOCK_MONOTONIC)