Skip to content

A platform for community discussion. Free, open, simple.

Don't retry trying to download a file in test.

Guo Xiang Tan347e4eadbcaa
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