rename classes for publishing
This commit is contained in:
parent
3ce6feb382
commit
558d942dde
|
@ -287,8 +287,8 @@ class BuildList < ActiveRecord::Base
|
||||||
binaries = packages.map{ |p| p.fullname if p.package_type == 'binary' }.compact
|
binaries = packages.map{ |p| p.fullname if p.package_type == 'binary' }.compact
|
||||||
|
|
||||||
Resque.push(
|
Resque.push(
|
||||||
worker_queue_with_priority("publish_build_list_container_#{type}_worker"),
|
worker_queue_with_priority("publish_#{type}_worker"),
|
||||||
'class' => worker_queue_class("AbfWorker::PublishBuildListContainer#{type.capitalize}Worker"),
|
'class' => worker_queue_class("AbfWorker::Publish#{type.capitalize}Worker"),
|
||||||
'args' => [{
|
'args' => [{
|
||||||
:id => id,
|
:id => id,
|
||||||
:arch => arch.name,
|
:arch => arch.name,
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
module AbfWorker
|
module AbfWorker
|
||||||
class PublishBuildListContainerObserver < AbfWorker::BaseObserver
|
class PublishObserver < AbfWorker::BaseObserver
|
||||||
@queue = :publish_build_list_container_observer
|
@queue = :publish_observer
|
||||||
|
|
||||||
def self.perform(options)
|
def self.perform(options)
|
||||||
bl = BuildList.find options['id']
|
bl = BuildList.find options['id']
|
||||||
|
@ -20,7 +20,7 @@ module AbfWorker
|
||||||
|
|
||||||
def self.update_results(subject, options)
|
def self.update_results(subject, options)
|
||||||
results = (subject.results || []).
|
results = (subject.results || []).
|
||||||
map{ |r| r if r['file_name'] !~ /^abfworker\:\:publish\-build\-list\-container\-worker.*\.log$/ }.
|
map{ |r| r if r['file_name'] !~ /^abfworker\:\:publish\-worker.*\.log$/ }.
|
||||||
compact
|
compact
|
||||||
results += options['results']
|
results += options['results']
|
||||||
sort_results_and_save(subject, results)
|
sort_results_and_save(subject, results)
|
|
@ -26,7 +26,7 @@ Capistrano::Configuration.instance(:must_exist).load do
|
||||||
end
|
end
|
||||||
|
|
||||||
def start_workers
|
def start_workers
|
||||||
run "cd #{fetch :current_path} && COUNT=#{workers_count} QUEUE=fork_import,hook,clone_build,notification,iso_worker_observer,rpm_worker_observer,publish_build_list_container_observer #{rails_env} BACKGROUND=yes bundle exec rake resque:workers"
|
run "cd #{fetch :current_path} && COUNT=#{workers_count} QUEUE=fork_import,hook,clone_build,notification,iso_worker_observer,rpm_worker_observer,publish_observer #{rails_env} BACKGROUND=yes bundle exec rake resque:workers"
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
Loading…
Reference in New Issue