Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTiago Botelho <tiagonbotelho@hotmail.com>2018-05-02 16:35:04 +0300
committerTiago Botelho <tiagonbotelho@hotmail.com>2018-05-04 18:33:26 +0300
commitbddbcaefc2389e4c61763472cecbea150f10cd75 (patch)
tree38ba599beed53505dfca09fce7a890bf3b125bb3 /app/workers/gitlab
parent7603beffc916d06039cac63b223d8e6234b5d666 (diff)
Backports every CE related change from ee-44542 to CE
Diffstat (limited to 'app/workers/gitlab')
-rw-r--r--app/workers/gitlab/github_import/advance_stage_worker.rb9
-rw-r--r--app/workers/gitlab/github_import/refresh_import_jid_worker.rb5
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