From 86c717dee515b4b401b4fa26f88e3d594d611742 Mon Sep 17 00:00:00 2001 From: Pavel Chipiga Date: Thu, 23 Feb 2012 21:06:28 +0200 Subject: [PATCH] Build only main repo. Refs #207 --- app/models/platform.rb | 16 +++++++--------- 1 file changed, 7 insertions(+), 9 deletions(-) diff --git a/app/models/platform.rb b/app/models/platform.rb index 76756ee3e..6a109fa2d 100644 --- a/app/models/platform.rb +++ b/app/models/platform.rb @@ -159,15 +159,13 @@ class Platform < ActiveRecord::Base end def build_all(user) - repositories.each do |r| - r.projects.find_in_batches(:batch_size => 5) do |group| - sleep 1 - group.each do |p| - begin - p.build_for(self, user) - rescue RuntimeError, Exception - p.delay.build_for(self, user) - end + repositories.find_by_name('main').projects.find_in_batches(:batch_size => 5) do |group| + sleep 1 + group.each do |p| + begin + p.build_for(self, user) + rescue RuntimeError, Exception + p.delay.build_for(self, user) end end end