FIX: Excon was wrapping our `ReadOnly` exception

This was preventing the crawling of many topic links
This commit is contained in:
Robin Ward 2015-05-27 14:29:52 -04:00
parent 5890dae64c
commit 1434e46ed2
1 changed files with 3 additions and 0 deletions

View File

@ -76,6 +76,9 @@ module Jobs
Excon.get(uri.to_s, response_block: streamer, read_timeout: 20, headers: CrawlTopicLink.request_headers(uri)) Excon.get(uri.to_s, response_block: streamer, read_timeout: 20, headers: CrawlTopicLink.request_headers(uri))
result result
rescue Excon::Errors::SocketError => ex
return result if ex.socket_error.is_a?(ReadEnough)
raise
rescue ReadEnough rescue ReadEnough
result result
end end