diff options
Diffstat (limited to 'lib/gitlab/import_export/legacy_relation_tree_saver.rb')
-rw-r--r-- | lib/gitlab/import_export/legacy_relation_tree_saver.rb | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/lib/gitlab/import_export/legacy_relation_tree_saver.rb b/lib/gitlab/import_export/legacy_relation_tree_saver.rb index cf75a2c7fa8..f8b8b74ffd7 100644 --- a/lib/gitlab/import_export/legacy_relation_tree_saver.rb +++ b/lib/gitlab/import_export/legacy_relation_tree_saver.rb @@ -7,7 +7,7 @@ module Gitlab def serialize(exportable, relations_tree) Gitlab::ImportExport::FastHashSerializer - .new(exportable, relations_tree) + .new(exportable, relations_tree, batch_size: batch_size(exportable)) .execute end @@ -18,6 +18,12 @@ module Gitlab File.write(File.join(dir_path, filename), tree_json) end + + private + + def batch_size(exportable) + Gitlab::ImportExport::JSON::StreamingSerializer.batch_size(exportable) + end end end end |