1
0
Fork 0
mirror of https://github.com/mperham/sidekiq.git synced 2022-11-09 13:52:34 -05:00

Migrate to exists? for redis-rb 4.2, fixes #4591

This commit is contained in:
Mike Perham 2020-06-09 15:14:02 -07:00
parent 3e26e06d06
commit 6a334042ee
7 changed files with 11 additions and 10 deletions

View file

@ -9,7 +9,8 @@ HEAD
- Ensure `Rack::ContentLength` is loaded as middleware for correct Web UI responses [#4541]
- Avoid exception dumping SSL store in Redis connection logging [#4532]
- Better error messages in Sidekiq::Client [#4549]
- Vendor rack-protection/authenticity_token middleware [#4588]
- Remove rack-protection, reimplement CSRF protection [#4588]
- Require redis-rb 4.2.0
6.0.7
---------

View file

@ -1,10 +1,10 @@
PATH
remote: .
specs:
sidekiq (6.0.7)
sidekiq (6.1.0)
connection_pool (>= 2.2.2)
rack (~> 2.0)
redis (>= 4.1.0)
redis (>= 4.2.0)
GEM
remote: https://rubygems.org/
@ -74,7 +74,7 @@ GEM
byebug (11.1.1)
coderay (1.1.2)
concurrent-ruby (1.1.6)
connection_pool (2.2.2)
connection_pool (2.2.3)
crass (1.0.6)
docile (1.3.2)
erubi (1.9.0)
@ -146,7 +146,7 @@ GEM
thor (>= 0.20.3, < 2.0)
rainbow (3.0.0)
rake (13.0.1)
redis (4.1.3)
redis (4.2.0)
redis-namespace (1.7.0)
redis (>= 3.0.4)
rexml (3.2.4)

View file

@ -921,7 +921,7 @@ module Sidekiq
procs = conn.sscan_each("processes").to_a
procs.sort.each do |key|
valid, workers = conn.pipelined {
conn.exists(key)
conn.exists?(key)
conn.hgetall("#{key}:workers")
}
next unless valid

View file

@ -157,7 +157,7 @@ module Sidekiq
_, exists, _, _, msg = Sidekiq.redis { |conn|
conn.multi {
conn.sadd("processes", key)
conn.exists(key)
conn.exists?(key)
conn.hmset(key, "info", to_json, "busy", curstate.size, "beat", Time.now.to_f, "quiet", @done)
conn.expire(key, 60)
conn.rpop("#{key}-signals")

View file

@ -14,7 +14,7 @@ Gem::Specification.new do |gem|
gem.version = Sidekiq::VERSION
gem.required_ruby_version = ">= 2.5.0"
gem.add_dependency "redis", ">= 4.1.0"
gem.add_dependency "redis", ">= 4.2.0"
gem.add_dependency "connection_pool", ">= 2.2.2"
gem.add_dependency "rack", "~> 2.0"
end

View file

@ -422,7 +422,7 @@ describe 'API' do
Sidekiq.redis do |conn|
refute conn.smembers('queues').include?('foo')
refute conn.exists('queue:foo')
refute conn.exists?('queue:foo')
end
end

View file

@ -164,7 +164,7 @@ describe Sidekiq::Web do
Sidekiq.redis do |conn|
refute conn.smembers('queues').include?('foo')
refute conn.exists('queue:foo')
refute conn.exists?('queue:foo')
end
end