Class: Upperkut::Configuration
- Inherits:
-
Object
- Object
- Upperkut::Configuration
- Defined in:
- lib/upperkut.rb
Instance Attribute Summary collapse
-
#batch_size ⇒ Object
Returns the value of attribute batch_size.
-
#max_wait ⇒ Object
Returns the value of attribute max_wait.
-
#polling_interval ⇒ Object
Returns the value of attribute polling_interval.
-
#redis ⇒ Object
Returns the value of attribute redis.
-
#strategy ⇒ Object
Returns the value of attribute strategy.
Class Method Summary collapse
Instance Method Summary collapse
Instance Attribute Details
#batch_size ⇒ Object
Returns the value of attribute batch_size.
54 55 56 |
# File 'lib/upperkut.rb', line 54 def batch_size @batch_size end |
#max_wait ⇒ Object
Returns the value of attribute max_wait.
54 55 56 |
# File 'lib/upperkut.rb', line 54 def max_wait @max_wait end |
#polling_interval ⇒ Object
Returns the value of attribute polling_interval.
54 55 56 |
# File 'lib/upperkut.rb', line 54 def polling_interval @polling_interval end |
#redis ⇒ Object
Returns the value of attribute redis.
54 55 56 |
# File 'lib/upperkut.rb', line 54 def redis @redis end |
#strategy ⇒ Object
Returns the value of attribute strategy.
54 55 56 |
# File 'lib/upperkut.rb', line 54 def strategy @strategy end |
Class Method Details
.default ⇒ Object
56 57 58 59 60 61 62 63 |
# File 'lib/upperkut.rb', line 56 def self.default new.tap do |config| config.batch_size = 1_000 config.redis = Redis.new config.max_wait = Integer(ENV['UPPERKUT_MAX_WAIT'] || 20) config.polling_interval = Integer(ENV['UPPERKUT_POLLING_INTERVAL'] || 5) end end |
Instance Method Details
#middlewares {|@middlewares| ... } ⇒ Object
65 66 67 68 69 |
# File 'lib/upperkut.rb', line 65 def middlewares @middlewares ||= init_middleware_chain yield @middlewares if block_given? @middlewares end |