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 ...@@ -69,11 +69,13 @@ module Gitlab
end end
def serialize_many_each(key, records, options) def serialize_many_each(key, records, options)
records.each do |record| enumerator = Enumerator.new do |items|
json = Raw.new(record.to_json(options)) records.each do |record|
items << Raw.new(record.to_json(options))
json_writer.append(key, json) end
end end
json_writer.write_relation_array(@exportable_path, key, enumerator)
end end
def serialize_single_relation(key, record, options) 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