Class: Gitlab::JiraImport::Stage::StartImportWorker
- Inherits:
-
Object
- Object
- Gitlab::JiraImport::Stage::StartImportWorker
- Defined in:
- app/workers/gitlab/jira_import/stage/start_import_worker.rb
Overview
rubocop:disable Scalability/IdempotentWorker
Constant Summary
Constants included from ProjectImportOptions
ProjectImportOptions::IMPORT_RETRY_COUNT
Constants included from ApplicationWorker
ApplicationWorker::LOGGING_EXTRA_KEY, ApplicationWorker::SAFE_PUSH_BULK_LIMIT
Constants included from Loggable
Constants included from WorkerAttributes
WorkerAttributes::DEFAULT_DATA_CONSISTENCY, WorkerAttributes::DEFAULT_DEFER_DELAY, WorkerAttributes::NAMESPACE_WEIGHTS, WorkerAttributes::VALID_DATA_CONSISTENCIES, WorkerAttributes::VALID_RESOURCE_BOUNDARIES, WorkerAttributes::VALID_URGENCIES
Instance Attribute Summary collapse
-
#project ⇒ Object
readonly
Returns the value of attribute project.
Instance Method Summary collapse
Methods included from ProjectStartImport
Methods included from Loggable
Methods included from SidekiqVersioning::Worker
Methods included from WorkerContext
Instance Attribute Details
#project ⇒ Object (readonly)
Returns the value of attribute project.
16 17 18 |
# File 'app/workers/gitlab/jira_import/stage/start_import_worker.rb', line 16 def project @project end |
Instance Method Details
#perform(project_id) ⇒ Object
18 19 20 21 22 23 24 25 26 |
# File 'app/workers/gitlab/jira_import/stage/start_import_worker.rb', line 18 def perform(project_id) @project = Project.find_by_id(project_id) return unless start_import Gitlab::Import::SetAsyncJid.set_jid(project.latest_jira_import) Gitlab::JiraImport::Stage::ImportLabelsWorker.perform_async(project.id) end |