Class: Resque::Data::Config

Inherits:
Object
  • Object
show all
Defined in:
lib/resque-data/config.rb

Class Method Summary collapse

Class Method Details

.default_redisObject



10
11
12
13
14
# File 'lib/resque-data/config.rb', line 10

def self.default_redis
  Thread.current[:redis_data_default_redis].tap do |ans|
    return nil if ans.nil?
  end
end

.default_redis=(arg) ⇒ Object



6
7
8
# File 'lib/resque-data/config.rb', line 6

def self.default_redis=(arg)
  Thread.current[:redis_data_default_redis] = arg
end

.multi_namespaceObject



20
21
22
23
24
# File 'lib/resque-data/config.rb', line 20

def self.multi_namespace
  Thread.current[:redis_data_multi_namespace].tap do |ans|
    return true if ans.nil?
  end
end

.multi_namespace=(true_or_false) ⇒ Object



16
17
18
# File 'lib/resque-data/config.rb', line 16

def self.multi_namespace=(true_or_false)
  Thread.current[:redis_data_multi_namespace] = !!true_or_false
end

.multi_redisObject



30
31
32
33
34
# File 'lib/resque-data/config.rb', line 30

def self.multi_redis
  Thread.current[:redis_data_multi_redis].tap do |ans|
    return true if ans.nil?
  end
end

.multi_redis=(true_or_false) ⇒ Object



26
27
28
# File 'lib/resque-data/config.rb', line 26

def self.multi_redis=(true_or_false)
  Thread.current[:redis_data_multi_redis] = !!true_or_false
end