Build only main repo. Refs #207

This commit is contained in:
Pavel Chipiga 2012-02-23 21:06:28 +02:00
parent 66fc31e404
commit 86c717dee5
1 changed files with 7 additions and 9 deletions

View File

@ -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