diff --git a/app/models/build_list.rb b/app/models/build_list.rb index 1f63901cf..622c528e6 100644 --- a/app/models/build_list.rb +++ b/app/models/build_list.rb @@ -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, diff --git a/lib/abf_worker/publish_build_list_container_observer.rb b/lib/abf_worker/publish_observer.rb similarity index 79% rename from lib/abf_worker/publish_build_list_container_observer.rb rename to lib/abf_worker/publish_observer.rb index a06012950..59bf86866 100644 --- a/lib/abf_worker/publish_build_list_container_observer.rb +++ b/lib/abf_worker/publish_observer.rb @@ -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) diff --git a/lib/recipes/resque.rb b/lib/recipes/resque.rb index 3bac324f5..41c2254c9 100644 --- a/lib/recipes/resque.rb +++ b/lib/recipes/resque.rb @@ -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