diff options
author | Tiago Botelho <tiagonbotelho@hotmail.com> | 2018-05-02 14:35:04 +0100 |
---|---|---|
committer | Tiago Botelho <tiagonbotelho@hotmail.com> | 2018-05-04 17:33:26 +0200 |
commit | bddbcaefc2389e4c61763472cecbea150f10cd75 (patch) | |
tree | 38ba599beed53505dfca09fce7a890bf3b125bb3 /app/workers/gitlab/github_import | |
parent | 7603beffc916d06039cac63b223d8e6234b5d666 (diff) | |
download | gitlab-ce-bddbcaefc2389e4c61763472cecbea150f10cd75.tar.gz |
Backports every CE related change from ee-44542 to CE
Diffstat (limited to 'app/workers/gitlab/github_import')
-rw-r--r-- | app/workers/gitlab/github_import/advance_stage_worker.rb | 9 | ||||
-rw-r--r-- | app/workers/gitlab/github_import/refresh_import_jid_worker.rb | 5 |
2 files changed, 8 insertions, 6 deletions
diff --git a/app/workers/gitlab/github_import/advance_stage_worker.rb b/app/workers/gitlab/github_import/advance_stage_worker.rb index f7f498af840..8d708e15a66 100644 --- a/app/workers/gitlab/github_import/advance_stage_worker.rb +++ b/app/workers/gitlab/github_import/advance_stage_worker.rb @@ -63,11 +63,10 @@ module Gitlab end def find_project(id) - # We only care about the import JID so we can refresh it. We also only - # want the project if it hasn't been marked as failed yet. It's possible - # the import gets marked as stuck when jobs of the current stage failed - # somehow. - Project.select(:import_jid).import_started.find_by(id: id) + # TODO: Only select the JID + # This is due to the fact that the JID could be present in either the project record or + # its associated import_state record + Project.import_started.find_by(id: id) end end end diff --git a/app/workers/gitlab/github_import/refresh_import_jid_worker.rb b/app/workers/gitlab/github_import/refresh_import_jid_worker.rb index 7108b531bc2..68d2c5c4331 100644 --- a/app/workers/gitlab/github_import/refresh_import_jid_worker.rb +++ b/app/workers/gitlab/github_import/refresh_import_jid_worker.rb @@ -31,7 +31,10 @@ module Gitlab end def find_project(id) - Project.select(:import_jid).import_started.find_by(id: id) + # TODO: Only select the JID + # This is due to the fact that the JID could be present in either the project record or + # its associated import_state record + Project.import_started.find_by(id: id) end end end |