Class: Gitlab::GithubImport::ImportIssueEventWorker

Inherits:
Object
  • Object
show all
Includes:
ObjectImporter
Defined in:
app/workers/gitlab/github_import/import_issue_event_worker.rb

Overview

rubocop:disable Scalability/IdempotentWorker

Constant Summary

Constants included from ObjectImporter

ObjectImporter::NotRetriableError

Instance Method Summary collapse

Methods included from ObjectImporter

#import, #increment_object_counter?

Instance Method Details

#import_settingsObject



25
26
27
# File 'app/workers/gitlab/github_import/import_issue_event_worker.rb', line 25

def import_settings
  @import_settings ||= Gitlab::GithubImport::Settings.new(project)
end

#importer_classObject



12
13
14
# File 'app/workers/gitlab/github_import/import_issue_event_worker.rb', line 12

def importer_class
  Importer::IssueEventImporter
end

#increment_object_counter(object, project) ⇒ Object



20
21
22
23
# File 'app/workers/gitlab/github_import/import_issue_event_worker.rb', line 20

def increment_object_counter(object, project)
  counter_type = importer_class::EVENT_COUNTER_MAP[object[:event]] || object_type
  Gitlab::GithubImport::ObjectCounter.increment(project, counter_type, :imported)
end

#object_typeObject



16
17
18
# File 'app/workers/gitlab/github_import/import_issue_event_worker.rb', line 16

def object_type
  :issue_event
end

#representation_classObject



8
9
10
# File 'app/workers/gitlab/github_import/import_issue_event_worker.rb', line 8

def representation_class
  Representation::IssueEvent
end