From 1434e46ed214cd6e0c35ea101d57bbddb80c4a8f Mon Sep 17 00:00:00 2001 From: Robin Ward Date: Wed, 27 May 2015 14:29:52 -0400 Subject: [PATCH] FIX: Excon was wrapping our `ReadOnly` exception This was preventing the crawling of many topic links --- app/jobs/regular/crawl_topic_link.rb | 3 +++ 1 file changed, 3 insertions(+) diff --git a/app/jobs/regular/crawl_topic_link.rb b/app/jobs/regular/crawl_topic_link.rb index 8b54ee88993..7ad789cfedc 100644 --- a/app/jobs/regular/crawl_topic_link.rb +++ b/app/jobs/regular/crawl_topic_link.rb @@ -76,6 +76,9 @@ module Jobs Excon.get(uri.to_s, response_block: streamer, read_timeout: 20, headers: CrawlTopicLink.request_headers(uri)) result + rescue Excon::Errors::SocketError => ex + return result if ex.socket_error.is_a?(ReadEnough) + raise rescue ReadEnough result end