Class: Gitlab::JiraImport::IssuesImporter

Inherits:
BaseImporter show all
Defined in:
lib/gitlab/jira_import/issues_importer.rb

Constant Summary collapse

BATCH_SIZE =

Jira limits max items per request to be fetched to 100 see jira.atlassian.com/browse/JRACLOUD-67570 We set it to 1000 in case they change their mind.

1000

Instance Attribute Summary collapse

Attributes inherited from BaseImporter

#client, #formatter, #jira_project_key, #project, #running_import

Instance Method Summary collapse

Constructor Details

#initialize(project) ⇒ IssuesImporter

Returns a new instance of IssuesImporter.


13
14
15
16
17
18
19
# File 'lib/gitlab/jira_import/issues_importer.rb', line 13

def initialize(project)
  super
  # get cached start_at value, or zero if not cached yet
  @start_at = Gitlab::JiraImport.get_issues_next_start_at(project.id)
  @imported_items_cache_key = JiraImport.already_imported_cache_key(:issues, project.id)
  @job_waiter = JobWaiter.new
end

Instance Attribute Details

#imported_items_cache_keyObject (readonly)

Returns the value of attribute imported_items_cache_key.


11
12
13
# File 'lib/gitlab/jira_import/issues_importer.rb', line 11

def imported_items_cache_key
  @imported_items_cache_key
end

#job_waiterObject (readonly)

Returns the value of attribute job_waiter.


11
12
13
# File 'lib/gitlab/jira_import/issues_importer.rb', line 11

def job_waiter
  @job_waiter
end

#start_atObject (readonly)

Returns the value of attribute start_at.


11
12
13
# File 'lib/gitlab/jira_import/issues_importer.rb', line 11

def start_at
  @start_at
end

Instance Method Details

#executeObject


21
22
23
# File 'lib/gitlab/jira_import/issues_importer.rb', line 21

def execute
  import_issues
end