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

Update redis gem to avoid using the deprecated client API, fixes #3617

This commit is contained in:
Mike Perham 2017-09-28 21:43:41 -07:00
parent 33b3bb1114
commit 84273fb346
3 changed files with 4 additions and 2 deletions

View file

@ -5,6 +5,7 @@
HEAD HEAD
----------- -----------
- Update gemspec to allow newer versions of the Redis gem [#3617]
- Refactor Worker.set so it can be memoized [#3602] - Refactor Worker.set so it can be memoized [#3602]
- Fix display of Redis URL in web footer, broken in 5.0.3 [#3560] - Fix display of Redis URL in web footer, broken in 5.0.3 [#3560]

View file

@ -148,7 +148,8 @@ module Sidekiq
end end
def redis_connection def redis_connection
Sidekiq.redis { |conn| "redis://#{conn.client.location}/#{conn.client.db}" } attrs = Sidekiq.redis { |conn| conn.connection }
"redis://#{attrs[:location]}/#{attrs[:db]}"
end end
def namespace def namespace

View file

@ -17,7 +17,7 @@ Gem::Specification.new do |gem|
gem.version = Sidekiq::VERSION gem.version = Sidekiq::VERSION
gem.required_ruby_version = ">= 2.2.2" gem.required_ruby_version = ">= 2.2.2"
gem.add_dependency 'redis', '~> 3.3', '>= 3.3.3' gem.add_dependency 'redis', '>= 3.3.4', '< 5'
gem.add_dependency 'connection_pool', '~> 2.2', '>= 2.2.0' gem.add_dependency 'connection_pool', '~> 2.2', '>= 2.2.0'
gem.add_dependency 'concurrent-ruby', '~> 1.0' gem.add_dependency 'concurrent-ruby', '~> 1.0'
gem.add_dependency 'rack-protection', '>= 1.5.0' gem.add_dependency 'rack-protection', '>= 1.5.0'