From 347e4eadbcaa217894b0d6789cf955e970d04340 Mon Sep 17 00:00:00 2001 From: Guo Xiang Tan <tgx_world@hotmail.com> Date: Wed, 28 Mar 2018 12:54:11 +0800 Subject: [PATCH] Don't retry trying to download a file in test. --- app/jobs/regular/pull_hotlinked_images.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/jobs/regular/pull_hotlinked_images.rb b/app/jobs/regular/pull_hotlinked_images.rb index b920c60590c..7de892a84e0 100644 --- a/app/jobs/regular/pull_hotlinked_images.rb +++ b/app/jobs/regular/pull_hotlinked_images.rb @@ -24,7 +24,7 @@ module Jobs follow_redirect: true ) rescue - if (retries -= 1) > 0 + if (retries -= 1) > 0 && !Rails.env.test? sleep 1 retry end