Commit 81495528 authored by James Lopez's avatar James Lopez

refactored wait_for_archived_file method

parent dad1d0b8
...@@ -30,14 +30,12 @@ module Gitlab ...@@ -30,14 +30,12 @@ module Gitlab
# Exponentially sleep until I/O finishes copying the file # Exponentially sleep until I/O finishes copying the file
def wait_for_archived_file def wait_for_archived_file
MAX_RETRIES.times do |retry_number| MAX_RETRIES.times do |retry_number|
if File.exist?(@archive_file) break if File.exist?(@archive_file)
yield
return true sleep(2**retry_number)
else
sleep(2**retry_number)
end
end end
yield
end end
def decompress_archive def decompress_archive
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment