#755: fix: undefended constants
This commit is contained in:
parent
3b8524bd28
commit
eba86106ca
|
@ -1,12 +1,12 @@
|
||||||
module AbfWorker
|
module AbfWorker
|
||||||
module ObserverHelper
|
class BaseObserver
|
||||||
BUILD_COMPLETED = 0
|
BUILD_COMPLETED = 0
|
||||||
BUILD_FAILED = 1
|
BUILD_FAILED = 1
|
||||||
BUILD_PENDING = 2
|
BUILD_PENDING = 2
|
||||||
BUILD_STARTED = 3
|
BUILD_STARTED = 3
|
||||||
BUILD_CANCELED = 4
|
BUILD_CANCELED = 4
|
||||||
|
|
||||||
def update_results(subject, options)
|
def self.update_results(subject, options)
|
||||||
results = (subject.results || [])+ options['results']
|
results = (subject.results || [])+ options['results']
|
||||||
subject.results = results.sort_by{ |r| r['file_name'] }
|
subject.results = results.sort_by{ |r| r['file_name'] }
|
||||||
subject.save!
|
subject.save!
|
|
@ -1,6 +1,5 @@
|
||||||
module AbfWorker
|
module AbfWorker
|
||||||
class IsoWorkerObserver
|
class IsoWorkerObserver < AbfWorker::BaseObserver
|
||||||
extend AbfWorker::ObserverHelper
|
|
||||||
@queue = :iso_worker_observer
|
@queue = :iso_worker_observer
|
||||||
|
|
||||||
def self.perform(options)
|
def self.perform(options)
|
||||||
|
|
|
@ -1,6 +1,5 @@
|
||||||
module AbfWorker
|
module AbfWorker
|
||||||
class PublishBuildListContainerObserver
|
class PublishBuildListContainerObserver < AbfWorker::BaseObserver
|
||||||
extend AbfWorker::ObserverHelper
|
|
||||||
@queue = :publish_build_list_container_observer
|
@queue = :publish_build_list_container_observer
|
||||||
|
|
||||||
def self.perform(options)
|
def self.perform(options)
|
||||||
|
|
|
@ -1,6 +1,5 @@
|
||||||
module AbfWorker
|
module AbfWorker
|
||||||
class RpmWorkerObserver
|
class RpmWorkerObserver < AbfWorker::BaseObserver
|
||||||
extend AbfWorker::ObserverHelper
|
|
||||||
@queue = :rpm_worker_observer
|
@queue = :rpm_worker_observer
|
||||||
|
|
||||||
def self.perform(options)
|
def self.perform(options)
|
||||||
|
|
Loading…
Reference in New Issue