Commit a3da41e8 authored by Alexandru Croitor's avatar Alexandru Croitor

Allow advance stage worker to implement its own state checker

For Jira imports we are using a different import state tracker
so we want to let Jira import AdvanceStageWorker to check its
corresponding import state.
parent ae92fe67
...@@ -21,6 +21,10 @@ module Gitlab ...@@ -21,6 +21,10 @@ module Gitlab
finish: Stage::FinishImportWorker finish: Stage::FinishImportWorker
}.freeze }.freeze
def find_import_state(project_id)
ProjectImportState.jid_by(project_id: project_id, status: :started)
end
private private
def next_stage_worker(next_stage) def next_stage_worker(next_stage)
......
...@@ -48,7 +48,7 @@ module Gitlab ...@@ -48,7 +48,7 @@ module Gitlab
end end
def find_import_state(project_id) def find_import_state(project_id)
ProjectImportState.jid_by(project_id: project_id, status: :started) raise NotImplementedError
end end
private private
......
...@@ -16,6 +16,10 @@ module Gitlab ...@@ -16,6 +16,10 @@ module Gitlab
finish: Gitlab::JiraImport::Stage::FinishImportWorker finish: Gitlab::JiraImport::Stage::FinishImportWorker
}.freeze }.freeze
def find_import_state(project_id)
ProjectImportState.jid_by(project_id: project_id, status: :started)
end
private private
def next_stage_worker(next_stage) def next_stage_worker(next_stage)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment