Commit 8ff9fc55 authored by James Lopez's avatar James Lopez

some more refactoring

parent d3348474
......@@ -62,21 +62,6 @@ module Gitlab
relation_hash_list = @tree_hash[relation_key.to_s]
save_relation_hash(relation_hash_list, relation_key)
end
# relation_key = relation.is_a?(Hash) ? relation.keys.first : relation
# relation_hash_list = @tree_hash[relation_key.to_s]
#
# next unless relation_hash_list
#
# if relation_hash_list.is_a?(Array)
# [relation_hash_list].flatten.each_slice(15) do |relation_hash_batch|
# save_relation_hash(relation_hash_batch, relation_key, saved)
# end
# else
# save_relation_hash(relation_hash_list, relation_key, saved)
# end
end
@saved.all?
end
......@@ -123,6 +108,7 @@ module Gitlab
tree_array = [tree_hash[relation_key]].flatten
while relation_item = tree_array.shift
Project.transaction do
process_sub_relation(relation, relation_item)
if save
......@@ -130,6 +116,7 @@ module Gitlab
tree_hash[relation_key].delete(relation_item)
end
end
end
tree_hash.delete(relation_key) if save
end
......
......@@ -16,7 +16,7 @@ module Gitlab
error_out(error.message, caller[0].dup)
@errors << error.message
# Debug:
Rails.logger.error(error.backtrace)
Rails.logger.error(error.backtrace.join("\n"))
end
private
......
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