lib/sidekiq/statistic/middleware.rb in sidekiq-statistic-1.1.0 vs lib/sidekiq/statistic/middleware.rb in sidekiq-statistic-1.2.0
- old
+ new
@@ -27,10 +27,10 @@
def save_entry_for_worker(worker_status)
status = worker_status.dup
time = worker_status[:last_runtime]
realtime_hash = "#{REDIS_HASH}:realtime:#{time.sec}"
- worker_key = "#{time.to_date}:#{status.delete :class}"
+ worker_key = "#{time.strftime "%Y-%m-%d"}:#{status.delete :class}"
Sidekiq.redis do |redis|
redis.pipelined do
redis.hincrby REDIS_HASH, "#{worker_key}:#{status[:last_job_status]}", 1
redis.hmset REDIS_HASH, "#{worker_key}:last_job_status", status[:last_job_status],