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
path: root/lib
diff options
context:
space:
mode:
authorMatija Čupić <matteeyah@gmail.com>2018-09-27 19:57:19 +0300
committerMatija Čupić <matteeyah@gmail.com>2018-09-27 19:57:19 +0300
commit6075a9323a228dfdb4aca7a99861e51c8988cc56 (patch)
treef551d3fc0bf4772a8877d9a632e6e4bb0f810052 /lib
parent2122a7707c3c9f44f44534dea16812db5c2b97da (diff)
Update all pipelines in single query
Diffstat (limited to 'lib')
-rw-r--r--lib/gitlab/background_migration/populate_external_pipeline_source.rb5
1 files changed, 2 insertions, 3 deletions
diff --git a/lib/gitlab/background_migration/populate_external_pipeline_source.rb b/lib/gitlab/background_migration/populate_external_pipeline_source.rb
index c2686d5fd27..f635064cac5 100644
--- a/lib/gitlab/background_migration/populate_external_pipeline_source.rb
+++ b/lib/gitlab/background_migration/populate_external_pipeline_source.rb
@@ -34,9 +34,8 @@ module Gitlab
end
def perform(start_id, stop_id)
- external_pipelines(start_id, stop_id).each do |pipeline|
- pipeline.update_attribute(:source, Migratable::Pipeline.sources[:external])
- end
+ external_pipelines(start_id, stop_id)
+ .update_all(:source, Migratable::Pipeline.sources[:external])
end
private