diff options
author | Stan Hu <stanhu@gmail.com> | 2018-12-12 10:05:40 -0800 |
---|---|---|
committer | Aleksei Lipniagov <alipniagov@gitlab.com> | 2019-08-21 13:24:44 +0300 |
commit | c913a21caa43b84a6bbc5fa6d19d46a30231de21 (patch) | |
tree | 86b2f859d1da70f5ba60bc0f4b687d25ee94c906 | |
parent | 9dce1a1f16c3f3227eeb79907e284336049ae924 (diff) | |
download | gitlab-ce-sh-improve-memory-project-export.tar.gz |
Move serialize_options where it's neededsh-improve-memory-project-export
-rw-r--r-- | lib/gitlab/import_export/project_hash_serializer.rb | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/gitlab/import_export/project_hash_serializer.rb b/lib/gitlab/import_export/project_hash_serializer.rb index befd985cc7f..dad803b32bc 100644 --- a/lib/gitlab/import_export/project_hash_serializer.rb +++ b/lib/gitlab/import_export/project_hash_serializer.rb @@ -54,7 +54,6 @@ module Gitlab # in batches. preload_data.each do |key, preload_clause| records = project.send(key) - selection = serialize_options(included_tree, key) next unless records @@ -64,6 +63,7 @@ module Gitlab end data[key.to_s] = [] + selection = serialize_options(included_tree, key) # Not all models use EachBatch, whereas ActiveRecord guarantees all models can use in_batches. records.in_batches do |batch| # rubocop:disable Cop/InBatches |