Skip to content

Commit

Permalink
Merge pull request #11 from alphasights/ap-need_moar_time
Browse files Browse the repository at this point in the history
Increase timeout allowed
  • Loading branch information
Abraham Petrillo authored Dec 5, 2016
2 parents 986031e + bdceb80 commit b810a2d
Showing 1 changed file with 8 additions and 3 deletions.
11 changes: 8 additions & 3 deletions lib/crawl/engine.rb
Original file line number Diff line number Diff line change
Expand Up @@ -62,9 +62,14 @@ def retrieve(page)
absolute_url = options[:domain] + page.relative_url

http = EventMachine::HttpRequest.new(absolute_url)
req = http.get :redirects => MAX_REDIRECTS, :head => {'authorization' => [options[:username], options[:password]]}
req.timeout(15)

req = http.get :redirects => MAX_REDIRECTS,
:connect_timeout => 20,
:inactivity_timeout => 20,
:head => {
'authorization' => [
options[:username], options[:password]
]
}
req.errback do
if req.nil?
page.intermittent("Req is nil. WAT?")
Expand Down

0 comments on commit b810a2d

Please sign in to comment.