1
0
Fork 0
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:
Max Spransy 2012-02-09 09:37:00 -06:00
parent b5c8fa7a62
commit e1ce920b15

View file

@ -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