#755: fix: undefended constants

This commit is contained in:
Vokhmin Alexey V 2012-12-11 19:25:25 +04:00
parent 3b8524bd28
commit eba86106ca
4 changed files with 5 additions and 8 deletions

View File

@ -1,12 +1,12 @@
module AbfWorker
module ObserverHelper
class BaseObserver
BUILD_COMPLETED = 0
BUILD_FAILED = 1
BUILD_PENDING = 2
BUILD_STARTED = 3
BUILD_CANCELED = 4
def update_results(subject, options)
def self.update_results(subject, options)
results = (subject.results || [])+ options['results']
subject.results = results.sort_by{ |r| r['file_name'] }
subject.save!

View File

@ -1,6 +1,5 @@
module AbfWorker
class IsoWorkerObserver
extend AbfWorker::ObserverHelper
class IsoWorkerObserver < AbfWorker::BaseObserver
@queue = :iso_worker_observer
def self.perform(options)

View File

@ -1,6 +1,5 @@
module AbfWorker
class PublishBuildListContainerObserver
extend AbfWorker::ObserverHelper
class PublishBuildListContainerObserver < AbfWorker::BaseObserver
@queue = :publish_build_list_container_observer
def self.perform(options)

View File

@ -1,6 +1,5 @@
module AbfWorker
class RpmWorkerObserver
extend AbfWorker::ObserverHelper
class RpmWorkerObserver < AbfWorker::BaseObserver
@queue = :rpm_worker_observer
def self.perform(options)