Commit b96fd44f authored by Ian Baum's avatar Ian Baum

Revert "Add retry logic to add_licenses"

This reverts commit d21d1fd3.
parent ac7488fd
......@@ -471,21 +471,14 @@ check_docs_internal_links:
content = File.read("/tmp/license.gitlab").strip;
FileUtils.rm_f("/tmp/license.gitlab");
10.times do |x|
begin
unless License.where(data:content).empty?
puts "License already exists";
Kernel.exit 0;
end
unless License.new(data: content).save
puts "Could not add license";
Kernel.exit 0;
end
rescue StandardError
puts "Database not ready yet. Try #{x+1} of 10"
sleep 6
end
unless License.where(data:content).empty?
puts "License already exists";
Kernel.exit 0;
end
unless License.new(data: content).save
puts "Could not add license";
Kernel.exit 0;
end
puts "License added";
......
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