Class: Gitlab::ImportExport::Project::RelationTreeRestorer

Inherits:
Group::RelationTreeRestorer show all
Defined in:
lib/gitlab/import_export/project/relation_tree_restorer.rb

Direct Known Subclasses

Sample::RelationTreeRestorer

Constant Summary collapse

GROUP_MODELS =

Relations which cannot be saved at project level (and have a group assigned)

[GroupLabel, Milestone, Epic].freeze

Constants included from Import::Framework::ProgressTracking

Import::Framework::ProgressTracking::CACHE_EXPIRATION

Instance Attribute Summary

Attributes inherited from Group::RelationTreeRestorer

#importable

Instance Method Summary collapse

Methods inherited from Group::RelationTreeRestorer

#initialize, #restore

Methods included from Import::Framework::ProgressTracking

#processed_entry?, #save_processed_entry, #with_progress_tracking

Constructor Details

This class inherits a constructor from Gitlab::ImportExport::Group::RelationTreeRestorer

Instance Method Details

#relation_factory_params(relation_key, relation_index, data_hash) ⇒ Object



16
17
18
# File 'lib/gitlab/import_export/project/relation_tree_restorer.rb', line 16

def relation_factory_params(relation_key, relation_index, data_hash)
  super.merge({ import_source: ::Import::SOURCE_PROJECT_EXPORT_IMPORT })
end

#restore_single_relation(relation_key, extra_track_scope: {}) ⇒ Object



10
11
12
13
14
# File 'lib/gitlab/import_export/project/relation_tree_restorer.rb', line 10

def restore_single_relation(relation_key, extra_track_scope: {})
  bulk_insert_without_cache_or_touch do
    process_relation!(relation_key, relations[relation_key], extra_track_scope: extra_track_scope)
  end
end