Class: Aranha::Processor

Inherits:
Object
  • Object
show all
Defined in:
lib/aranha/processor.rb

Constant Summary collapse

NETWORK_EXCEPTIONS =
[::HTTPClient::BadResponseError, Errno::ECONNRESET].freeze
DEFAULT_MAX_TRIES =
3

Instance Method Summary collapse

Constructor Details

#initializeProcessor

Returns a new instance of Processor.



7
8
9
10
11
12
13
14
# File 'lib/aranha/processor.rb', line 7

def initialize
  ::Aranha::Address.clear_expired
  ::Aranha::Address.add_start_points
  @failed = {}
  @try = 0
  process_loop
  raise "Addresses failed: #{@failed.count}" if @failed.any?
end