Commit 09762c21 authored by Igor Drozdov's avatar Igor Drozdov

Merge branch 'fix-streaming-serializer' into 'master'

Fix streaming serializer for serialize_many_each

Closes #212607

See merge request gitlab-org/gitlab!28138
parents 6b258aa4 b02ed022
......@@ -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)
......
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