Skip to content

Commit

Permalink
[#saparjohnick] replace deprecated redis method hmset
Browse files Browse the repository at this point in the history
  • Loading branch information
Sapar Kurmanov committed Dec 1, 2023
1 parent f27c854 commit 39d1ef6
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion lib/sidekiq/statistic/base.rb
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@ def time_hash(timeslist, worker_key)
statistics = time_statistics(timeslist)

Sidekiq.redis do |redis|
redis.hmset Metrics::Store::REDIS_HASH,
redis.hset Metrics::Store::REDIS_HASH,
statistics.flat_map{ |(k, v)| ["#{worker_key}:#{k}", v] }
end

Expand Down
2 changes: 1 addition & 1 deletion lib/sidekiq/statistic/statistic/metrics/store.rb
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ def store_cache_metrics(redis)
redis.pipelined do |pipeline|
pipeline.hincrby(REDIS_HASH, @keys.status, 1)

pipeline.hmset(REDIS_HASH, @keys.last_job_status, @metric.status,
pipeline.hset(REDIS_HASH, @keys.last_job_status, @metric.status,
@keys.last_time, @metric.finished_at.to_i,
@keys.queue, @metric.queue)

Expand Down

0 comments on commit 39d1ef6

Please sign in to comment.