Speed up inserts

This commit is contained in:
Michael Kozono 2017-11-14 22:49:24 -08:00
parent b63e8f4adf
commit c25b7c0e3f
1 changed files with 4 additions and 2 deletions

View File

@ -80,8 +80,10 @@ module Gitlab
end
def insert_file_paths(file_paths)
file_paths.each do |file_path|
insert_file_path(file_path)
ActiveRecord::Base.transaction do
file_paths.each do |file_path|
insert_file_path(file_path)
end
end
end