mirror of
https://github.com/mperham/sidekiq.git
synced 2022-11-09 13:52:34 -05:00
Verify redis= is given a Hash or ConnectionPool
This commit is contained in:
parent
96d6c71573
commit
6847d664cc
1 changed files with 3 additions and 1 deletions
|
@ -63,8 +63,10 @@ module Sidekiq
|
|||
def self.redis=(hash)
|
||||
if hash.is_a?(Hash)
|
||||
@redis = RedisConnection.create(hash)
|
||||
else
|
||||
elsif hash.is_a?(ConnectionPool)
|
||||
@redis = hash
|
||||
else
|
||||
raise ArgumentError, "redis= requires a Hash or ConnectionPool"
|
||||
end
|
||||
end
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue