From 2a24997eb4aa8c0bf076475024c982c7e0d27a57 Mon Sep 17 00:00:00 2001 From: Vladimir Sharshov Date: Tue, 24 Apr 2012 23:03:45 +0400 Subject: [PATCH] Allow set custom priority for mass rebuild --- app/models/project.rb | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/app/models/project.rb b/app/models/project.rb index 08cd7c577..a4308160b 100644 --- a/app/models/project.rb +++ b/app/models/project.rb @@ -51,7 +51,7 @@ class Project < ActiveRecord::Base include Modules::Models::Owner - def build_for(platform, user, arch = 'i586') + def build_for(platform, user, arch = 'i586', priority = 0) # Select main and project platform repository(contrib, non-free and etc) # If main does not exist, will connect only project platform repository # If project platform repository is main, only main will be connect @@ -70,6 +70,7 @@ class Project < ActiveRecord::Base bl.user = user bl.auto_publish = true # already set as db default bl.include_repos = build_ids + bl.priority = priority end end