Class: Potlock::Configuration

Inherits:
Object
  • Object
show all
Defined in:
lib/potlock/configuration.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initializeConfiguration

Returns a new instance of Configuration.



14
15
16
17
18
19
20
21
# File 'lib/potlock/configuration.rb', line 14

def initialize
  @redis       = nil
  @redis_host  = "localhost"
  @redis_port  = "6379"
  @redis_db    = "1"
  @retry_count = 25
  @retry_delay = 200
end

Instance Attribute Details

#redisObject

Redis connection information



6
7
8
# File 'lib/potlock/configuration.rb', line 6

def redis
  @redis
end

#redis_dbObject

Redis connection information



6
7
8
# File 'lib/potlock/configuration.rb', line 6

def redis_db
  @redis_db
end

#redis_hostObject

Redis connection information



6
7
8
# File 'lib/potlock/configuration.rb', line 6

def redis_host
  @redis_host
end

#redis_portObject

Redis connection information



6
7
8
# File 'lib/potlock/configuration.rb', line 6

def redis_port
  @redis_port
end

#retry_countObject

How many times it’ll try to lock a resource



9
10
11
# File 'lib/potlock/configuration.rb', line 9

def retry_count
  @retry_count
end

#retry_delayObject

How many milliseconds to sleep before try to lock again



12
13
14
# File 'lib/potlock/configuration.rb', line 12

def retry_delay
  @retry_delay
end