Class: Potlock::Configuration
- Inherits:
-
Object
- Object
- Potlock::Configuration
- Defined in:
- lib/potlock/configuration.rb
Instance Attribute Summary collapse
-
#redis ⇒ Object
Redis connection information.
-
#redis_db ⇒ Object
Redis connection information.
-
#redis_host ⇒ Object
Redis connection information.
-
#redis_port ⇒ Object
Redis connection information.
-
#retry_count ⇒ Object
How many times it’ll try to lock a resource.
-
#retry_delay ⇒ Object
How many milliseconds to sleep before try to lock again.
Instance Method Summary collapse
-
#initialize ⇒ Configuration
constructor
A new instance of Configuration.
Constructor Details
#initialize ⇒ Configuration
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
#redis ⇒ Object
Redis connection information
6 7 8 |
# File 'lib/potlock/configuration.rb', line 6 def redis @redis end |
#redis_db ⇒ Object
Redis connection information
6 7 8 |
# File 'lib/potlock/configuration.rb', line 6 def redis_db @redis_db end |
#redis_host ⇒ Object
Redis connection information
6 7 8 |
# File 'lib/potlock/configuration.rb', line 6 def redis_host @redis_host end |
#redis_port ⇒ Object
Redis connection information
6 7 8 |
# File 'lib/potlock/configuration.rb', line 6 def redis_port @redis_port end |
#retry_count ⇒ Object
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_delay ⇒ Object
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 |