diff --git a/Changes.md b/Changes.md index f121156f..5f6ded7e 100644 --- a/Changes.md +++ b/Changes.md @@ -1,3 +1,10 @@ +HEAD +----------- + +- Raise error if application tries to configure Redis after the pool has been + established. Sidekiq's redis connection cannot be dynamically changed + at runtime. [#1309] + 2.17.0 ----------- diff --git a/lib/sidekiq.rb b/lib/sidekiq.rb index 8e8cec54..b7204de8 100644 --- a/lib/sidekiq.rb +++ b/lib/sidekiq.rb @@ -68,6 +68,7 @@ module Sidekiq end def self.redis=(hash) + raise "Sidekiq's redis pool has already been established, cannot configure" if @redis && !$TESTING return @redis = hash if hash.is_a?(ConnectionPool) if hash.is_a?(Hash)