Skip to content

Commit

Permalink
redis-client compatibility
Browse files Browse the repository at this point in the history
Signed-off-by: ygelfand <[email protected]>
  • Loading branch information
ygelfand committed Dec 14, 2023
1 parent adc356b commit c67bfd8
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/sidekiq-scheduler/redis_manager.rb
Original file line number Diff line number Diff line change
Expand Up @@ -156,7 +156,7 @@ def self.remove_elder_job_instances(job_name)
# @return [Integer] epoch time of last run of the job
def self.job_last_runtime(job_name)
Sidekiq.redis do |r|
r.zrevrangebyscore(pushed_job_key(job_name), "(#{Time.now.to_i}", 0, limit: [0, 1]).first.to_i
r.zrange(pushed_job_key(job_name), "(#{Time.now.to_i}", 0, 'BYSCORE', 'REV', 'LIMIT', 0, 1).first.to_i
end
end

Expand Down

0 comments on commit c67bfd8

Please sign in to comment.