Class: Gitlab::ImportExport::Project::ImportTask

Inherits:
BaseTask
  • Object
show all
Defined in:
lib/gitlab/import_export/project/import_task.rb

Instance Method Summary collapse

Methods inherited from BaseTask

#initialize

Methods included from WithRequestStore

#with_request_store

Constructor Details

This class inherits a constructor from Gitlab::ImportExport::Project::BaseTask

Instance Method Details

#importObject


7
8
9
10
11
12
13
14
15
16
17
18
# File 'lib/gitlab/import_export/project/import_task.rb', line 7

def import
  show_import_start_message

  run_isolated_sidekiq_job

  show_import_failures_count

  return error(project.import_state.last_error) if project.import_state&.last_error
  return error(project.errors.full_messages.to_sentence) if project.errors.any?

  success('Done!')
end