diff options
Diffstat (limited to 'lib/gitlab/phabricator_import/importer.rb')
-rw-r--r-- | lib/gitlab/phabricator_import/importer.rb | 44 |
1 files changed, 0 insertions, 44 deletions
diff --git a/lib/gitlab/phabricator_import/importer.rb b/lib/gitlab/phabricator_import/importer.rb deleted file mode 100644 index 0666fa0df01..00000000000 --- a/lib/gitlab/phabricator_import/importer.rb +++ /dev/null @@ -1,44 +0,0 @@ -# frozen_string_literal: true - -module Gitlab - module PhabricatorImport - class Importer - def self.async? - true - end - - def self.imports_repository? - # This does not really import a repository, but we want to skip all - # repository related tasks in the `Projects::ImportService` - true - end - - def initialize(project) - @project = project - end - - def execute - Gitlab::Import::SetAsyncJid.set_jid(project.import_state) - schedule_first_tasks_page - - true - rescue StandardError => e - fail_import(e.message) - - false - end - - private - - attr_reader :project - - def schedule_first_tasks_page - ImportTasksWorker.schedule(project.id) - end - - def fail_import(message) - project.import_state.mark_as_failed(message) - end - end - end -end |