summaryrefslogtreecommitdiff
path: root/lib/gitlab/import_export/json
diff options
context:
space:
mode:
authorGitLab Bot <gitlab-bot@gitlab.com>2020-03-26 21:07:52 +0000
committerGitLab Bot <gitlab-bot@gitlab.com>2020-03-26 21:07:52 +0000
commit03a70b84edfb86bc27f9234e1f1d157d3a33c555 (patch)
treed8df46fee3e5a97d3b9dbd7d2e69ccc9e3601de1 /lib/gitlab/import_export/json
parent165beade336f9049f95db3944b1c5c00a1e952cf (diff)
downloadgitlab-ce-03a70b84edfb86bc27f9234e1f1d157d3a33c555.tar.gz
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'lib/gitlab/import_export/json')
-rw-r--r--lib/gitlab/import_export/json/streaming_serializer.rb10
1 files changed, 6 insertions, 4 deletions
diff --git a/lib/gitlab/import_export/json/streaming_serializer.rb b/lib/gitlab/import_export/json/streaming_serializer.rb
index 04ca598ff5d..7f55a0a3821 100644
--- a/lib/gitlab/import_export/json/streaming_serializer.rb
+++ b/lib/gitlab/import_export/json/streaming_serializer.rb
@@ -69,11 +69,13 @@ module Gitlab
end
def serialize_many_each(key, records, options)
- records.each do |record|
- json = Raw.new(record.to_json(options))
-
- json_writer.append(key, json)
+ enumerator = Enumerator.new do |items|
+ records.each do |record|
+ items << Raw.new(record.to_json(options))
+ end
end
+
+ json_writer.write_relation_array(@exportable_path, key, enumerator)
end
def serialize_single_relation(key, record, options)