Class: Blinker::ManticoreWrapper
- Inherits:
-
Object
- Object
- Blinker::ManticoreWrapper
- Includes:
- HttpUtils
- Defined in:
- lib/blinkr/manticore_wrapper.rb
Instance Method Summary collapse
-
#initialize(config, context) ⇒ ManticoreWrapper
constructor
A new instance of ManticoreWrapper.
- #name ⇒ Object
- #process(url, limit, opts = {}, &block) ⇒ Object
- #process_all(urls, limit, opts = {}, &block) ⇒ Object
Constructor Details
#initialize(config, context) ⇒ ManticoreWrapper
Returns a new instance of ManticoreWrapper.
11 12 13 14 15 16 17 18 |
# File 'lib/blinkr/manticore_wrapper.rb', line 11 def initialize(config, context) @config = config.validate @client = Manticore::Client.new({:pool_max => (@config.maxconnects || 50), :pool_max_per_route => 10 }) @count = 0 @context = context end |
Instance Method Details
#name ⇒ Object
31 32 33 |
# File 'lib/blinkr/manticore_wrapper.rb', line 31 def name 'manticore' end |
#process(url, limit, opts = {}, &block) ⇒ Object
27 28 29 |
# File 'lib/blinkr/manticore_wrapper.rb', line 27 def process(url, limit, opts = {}, &block) _process url, limit, limit, opts, &block end |
#process_all(urls, limit, opts = {}, &block) ⇒ Object
20 21 22 23 24 25 |
# File 'lib/blinkr/manticore_wrapper.rb', line 20 def process_all(urls, limit, opts = {}, &block) urls.each do |url| process url, limit, opts, &block end @client.execute! end |