Commit 81495528 authored by James Lopez's avatar James Lopez

refactored wait_for_archived_file method

parent dad1d0b8
......@@ -30,14 +30,12 @@ module Gitlab
# Exponentially sleep until I/O finishes copying the file
def wait_for_archived_file
MAX_RETRIES.times do |retry_number|
if File.exist?(@archive_file)
yield
break if File.exist?(@archive_file)
return true
else
sleep(2**retry_number)
end
end
yield
end
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