#778: separate "binary" and "source" packages
This commit is contained in:
parent
514dcbe994
commit
f90bd06fb3
|
@ -218,8 +218,10 @@ class Project < ActiveRecord::Base
|
||||||
packages = packages.for_platform(main_platform.id) if main_platform
|
packages = packages.for_platform(main_platform.id) if main_platform
|
||||||
packages = packages.scoped_to_arch(arch.id).
|
packages = packages.scoped_to_arch(arch.id).
|
||||||
includes(:packages).last(10).
|
includes(:packages).last(10).
|
||||||
map{ |bl| bl.packages.pluck(:fullname) }.flatten
|
map{ |bl| bl.packages }.flatten
|
||||||
next if packages.empty?
|
sources = packages.map{ |p| p.fullname if p.package_type == 'source' }.compact
|
||||||
|
binaries = packages.map{ |p| p.fullname if p.package_type == 'binary' }.compact
|
||||||
|
next if sources.empty? && binaries.empty?
|
||||||
Resque.push(
|
Resque.push(
|
||||||
"publish_build_list_container_#{type}_worker",
|
"publish_build_list_container_#{type}_worker",
|
||||||
'class' => "AbfWorker::PublishBuildListContainer#{type.capitalize}Worker",
|
'class' => "AbfWorker::PublishBuildListContainer#{type.capitalize}Worker",
|
||||||
|
@ -227,7 +229,7 @@ class Project < ActiveRecord::Base
|
||||||
:id => repository.id,
|
:id => repository.id,
|
||||||
:arch => arch.name,
|
:arch => arch.name,
|
||||||
:distrib_type => type,
|
:distrib_type => type,
|
||||||
:packages => packages,
|
:packages => { :sources => sources, :binaries => binaries },
|
||||||
:platform => {
|
:platform => {
|
||||||
:platform_path => platform_path
|
:platform_path => platform_path
|
||||||
},
|
},
|
||||||
|
|
Loading…
Reference in New Issue