mirror of
https://github.com/mperham/sidekiq.git
synced 2022-11-09 13:52:34 -05:00
Raise error if we try to reconfig redis after it's been established, fixes #1309
This commit is contained in:
parent
4bd30f2c9a
commit
eb438ae66e
2 changed files with 8 additions and 0 deletions
|
@ -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
|
||||
-----------
|
||||
|
||||
|
|
|
@ -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)
|
||||
|
|
Loading…
Add table
Reference in a new issue