Retry file store check 3 times for package not found check
This commit is contained in:
parent
07dfd87b42
commit
0e664e802f
|
@ -60,12 +60,19 @@ module AbfWorkerService
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
TRIES = 3
|
||||||
|
|
||||||
def filter_build_lists_without_packages(*build_lists)
|
def filter_build_lists_without_packages(*build_lists)
|
||||||
ids = []
|
ids = []
|
||||||
build_lists = build_lists.flatten.select do |build_list|
|
build_lists = build_lists.flatten.select do |build_list|
|
||||||
|
sha1 = nil
|
||||||
|
TRIES.times do
|
||||||
sha1 = build_list.packages.pluck(:sha1).find do |sha1|
|
sha1 = build_list.packages.pluck(:sha1).find do |sha1|
|
||||||
!FileStoreService::File.new(sha1: sha1).exist?
|
!FileStoreService::File.new(sha1: sha1).exist?
|
||||||
end
|
end
|
||||||
|
break if sha1.present?
|
||||||
|
sleep 1
|
||||||
|
end
|
||||||
if sha1.present?
|
if sha1.present?
|
||||||
ids << build_list.id
|
ids << build_list.id
|
||||||
false
|
false
|
||||||
|
|
Loading…
Reference in New Issue