Class: Gitlab::BitbucketImport::ParallelImporter

Inherits:
Object
  • Object
show all
Defined in:
lib/gitlab/bitbucket_import/parallel_importer.rb

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(project) ⇒ ParallelImporter

Returns a new instance of ParallelImporter.



18
19
20
# File 'lib/gitlab/bitbucket_import/parallel_importer.rb', line 18

def initialize(project)
  @project = project
end

Class Method Details

.async?Boolean

Returns:

  • (Boolean)


6
7
8
# File 'lib/gitlab/bitbucket_import/parallel_importer.rb', line 6

def self.async?
  true
end

.imports_repository?Boolean

Returns:

  • (Boolean)


10
11
12
# File 'lib/gitlab/bitbucket_import/parallel_importer.rb', line 10

def self.imports_repository?
  true
end

.track_start_import(project) ⇒ Object



14
15
16
# File 'lib/gitlab/bitbucket_import/parallel_importer.rb', line 14

def self.track_start_import(project)
  Gitlab::Import::Metrics.new(:bitbucket_importer, project).track_start_import
end

Instance Method Details

#executeObject



22
23
24
25
26
27
28
29
30
# File 'lib/gitlab/bitbucket_import/parallel_importer.rb', line 22

def execute
  Gitlab::Import::SetAsyncJid.set_jid(project.import_state)

  Stage::ImportRepositoryWorker
    .with_status
    .perform_async(project.id)

  true
end