Change rescue

This commit is contained in:
Wedge 2018-09-03 23:58:18 +03:00
parent c0b2a194b9
commit 585295b50e
1 changed files with 5 additions and 1 deletions

View File

@ -68,7 +68,11 @@ module AbfWorkerService
sha1 = nil sha1 = nil
TRIES.times do |i| TRIES.times do |i|
sha1 = build_list.packages.pluck(:sha1).find do |sha1| sha1 = build_list.packages.pluck(:sha1).find do |sha1|
!FileStoreService::File.new(sha1: sha1).exist? rescue nil begin
!FileStoreService::File.new(sha1: sha1).exist?
rescue
nil
end
end end
break if !sha1.present? break if !sha1.present?
sleep 2**i sleep 2**i