rosa-build/lib/abf_worker/iso_worker_observer.rb

24 lines
487 B
Ruby
Raw Normal View History

2012-11-08 21:39:42 +00:00
module AbfWorker
2012-12-11 15:25:25 +00:00
class IsoWorkerObserver < AbfWorker::BaseObserver
2012-11-08 21:39:42 +00:00
@queue = :iso_worker_observer
def self.perform(options)
new(options, ProductBuildList).perform
end
def perform
case status
2012-12-13 12:30:37 +00:00
when COMPLETED
subject.build_success
2012-12-13 12:30:37 +00:00
when FAILED
subject.build_error
2012-12-13 12:30:37 +00:00
when STARTED
subject.start_build
2012-12-13 12:30:37 +00:00
when CANCELED
subject.build_canceled
end
update_results if status != STARTED
2012-11-08 21:39:42 +00:00
end
end
end