diff options
author | Tiago Botelho <tiagonbotelho@hotmail.com> | 2018-11-27 12:41:27 +0300 |
---|---|---|
committer | Tiago Botelho <tiagonbotelho@hotmail.com> | 2018-11-27 15:58:13 +0300 |
commit | 4bd8a427d4e8127f1badc7365b35702472918956 (patch) | |
tree | d8e64bd046f35b64ad6f88bdd062e1e8f364c327 /lib/gitlab/github_import | |
parent | d3f033d69cec33e8058ee9f029718882990175b0 (diff) |
Removes all the irrelevant import related code and columns
Clears the import related columns and code from the Project
model over to the ProjectImportState model
Diffstat (limited to 'lib/gitlab/github_import')
-rw-r--r-- | lib/gitlab/github_import/importer/repository_importer.rb | 2 | ||||
-rw-r--r-- | lib/gitlab/github_import/parallel_importer.rb | 3 |
2 files changed, 2 insertions, 3 deletions
diff --git a/lib/gitlab/github_import/importer/repository_importer.rb b/lib/gitlab/github_import/importer/repository_importer.rb index 374dc9d3c00..bc3ea9e9226 100644 --- a/lib/gitlab/github_import/importer/repository_importer.rb +++ b/lib/gitlab/github_import/importer/repository_importer.rb @@ -80,7 +80,7 @@ module Gitlab end def fail_import(message) - project.mark_import_as_failed(message) + project.import_state.mark_as_failed(message) false end end diff --git a/lib/gitlab/github_import/parallel_importer.rb b/lib/gitlab/github_import/parallel_importer.rb index a77ac1e4fa6..9d81441d96e 100644 --- a/lib/gitlab/github_import/parallel_importer.rb +++ b/lib/gitlab/github_import/parallel_importer.rb @@ -41,8 +41,7 @@ module Gitlab Gitlab::SidekiqStatus .set(jid, StuckImportJobsWorker::IMPORT_JOBS_EXPIRATION) - project.ensure_import_state - project.import_state&.update_column(:jid, jid) + project.import_state.update_column(:jid, jid) Stage::ImportRepositoryWorker .perform_async(project.id) |