diff options
author | Tiago Botelho <tiagonbotelho@hotmail.com> | 2018-05-02 16:35:04 +0300 |
---|---|---|
committer | Tiago Botelho <tiagonbotelho@hotmail.com> | 2018-05-04 18:33:26 +0300 |
commit | bddbcaefc2389e4c61763472cecbea150f10cd75 (patch) | |
tree | 38ba599beed53505dfca09fce7a890bf3b125bb3 /app/workers/gitlab/github_import/advance_stage_worker.rb | |
parent | 7603beffc916d06039cac63b223d8e6234b5d666 (diff) |
Backports every CE related change from ee-44542 to CE
Diffstat (limited to 'app/workers/gitlab/github_import/advance_stage_worker.rb')
-rw-r--r-- | app/workers/gitlab/github_import/advance_stage_worker.rb | 9 |
1 files changed, 4 insertions, 5 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 |