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
|
||||
|
||||
Resque.push(
|
||||
worker_queue_with_priority("publish_build_list_container_#{type}_worker"),
|
||||
'class' => worker_queue_class("AbfWorker::PublishBuildListContainer#{type.capitalize}Worker"),
|
||||
worker_queue_with_priority("publish_#{type}_worker"),
|
||||
'class' => worker_queue_class("AbfWorker::Publish#{type.capitalize}Worker"),
|
||||
'args' => [{
|
||||
:id => id,
|
||||
:arch => arch.name,
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
module AbfWorker
|
||||
class PublishBuildListContainerObserver < AbfWorker::BaseObserver
|
||||
@queue = :publish_build_list_container_observer
|
||||
class PublishObserver < AbfWorker::BaseObserver
|
||||
@queue = :publish_observer
|
||||
|
||||
def self.perform(options)
|
||||
bl = BuildList.find options['id']
|
||||
|
@ -20,7 +20,7 @@ module AbfWorker
|
|||
|
||||
def self.update_results(subject, options)
|
||||
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
|
||||
results += options['results']
|
||||
sort_results_and_save(subject, results)
|
|
@ -26,7 +26,7 @@ Capistrano::Configuration.instance(:must_exist).load do
|
|||
end
|
||||
|
||||
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
|
||||
|
|
Loading…
Reference in New Issue