mirror of
https://github.com/mperham/sidekiq.git
synced 2022-11-09 13:52:34 -05:00
set redis namespace only in initializer
This commit is contained in:
parent
b5c8fa7a62
commit
e1ce920b15
1 changed files with 3 additions and 2 deletions
|
@ -4,8 +4,9 @@ require 'redis/namespace'
|
|||
module Sidekiq
|
||||
class RedisConnection
|
||||
def self.create(url = nil, namespace = nil, pool = true)
|
||||
@namespace = namespace if namespace
|
||||
@namespace = namespace ? namespace : nil
|
||||
@url = url ? url : nil
|
||||
|
||||
if pool
|
||||
ConnectionPool.new { connect }
|
||||
else
|
||||
|
@ -23,7 +24,7 @@ module Sidekiq
|
|||
end
|
||||
|
||||
def self.namespace
|
||||
@namespace ||= nil
|
||||
@namespace
|
||||
end
|
||||
|
||||
def self.url
|
||||
|
|
Loading…
Reference in a new issue