mirror of
https://github.com/discourse/discourse.git
synced 2025-03-03 14:49:56 +08:00
DEV: Add 'starting' event to sidekiq log when interval logging enabled
This commit is contained in:
parent
3474701146
commit
0a4562253e
@ -30,7 +30,12 @@ module Jobs
|
||||
@data["job_type"] = job_class.try(:scheduled?) ? "scheduled" : "regular" # Job Type - either s for scheduled or r for regular
|
||||
@data["opts"] = opts.to_json # Params - json encoded params for the job
|
||||
|
||||
@data["status"] = 'pending'
|
||||
if ENV["DISCOURSE_LOG_SIDEKIQ_INTERVAL"]
|
||||
@data["status"] = "starting"
|
||||
write_to_log
|
||||
end
|
||||
|
||||
@data["status"] = "pending"
|
||||
@start_timestamp = Process.clock_gettime(Process::CLOCK_MONOTONIC)
|
||||
|
||||
self.class.ensure_interval_logging!
|
||||
|
Loading…
x
Reference in New Issue
Block a user