Class: DaimonSkycrawlers::Processor::Default
- Defined in:
- lib/daimon_skycrawlers/processor/default.rb
Instance Method Summary collapse
Methods inherited from Base
#before_process, #initialize, #process, #storage
Methods included from ConfigMixin
Methods included from LoggerMixin
Constructor Details
This class inherits a constructor from DaimonSkycrawlers::Processor::Base
Instance Method Details
#call(message) ⇒ Object
7 8 9 10 11 12 13 14 15 16 17 18 19 20 |
# File 'lib/daimon_skycrawlers/processor/default.rb', line 7 def call() return if [:heartbeat] url = [:url] page = storage.find(url) headers = JSON.parse(page.headers) headers_string = headers.map {|key, value| " #{key}: #{value}" }.join("\n") = "URL: \#{page.url}\nBody: \#{page.body.bytesize} bytes\nHeaders:\n\#{headers_string}\n" log.info() end |