2012-11-08 21:39:42 +00:00
|
|
|
module AbfWorker
|
|
|
|
class IsoWorkerObserver
|
2012-12-11 10:42:15 +00:00
|
|
|
extend AbfWorker::ObserverHelper
|
2012-11-08 21:39:42 +00:00
|
|
|
@queue = :iso_worker_observer
|
|
|
|
|
|
|
|
def self.perform(options)
|
|
|
|
status = options['status'].to_i
|
|
|
|
pbl = ProductBuildList.find options['id']
|
2012-12-06 19:18:28 +00:00
|
|
|
case status
|
|
|
|
when BUILD_COMPLETED
|
|
|
|
pbl.build_success
|
|
|
|
when BUILD_FAILED
|
|
|
|
pbl.build_error
|
|
|
|
when BUILD_STARTED
|
|
|
|
pbl.start_build
|
|
|
|
when BUILD_CANCELED
|
|
|
|
pbl.build_canceled
|
|
|
|
end
|
|
|
|
if status != BUILD_STARTED
|
2012-12-11 11:47:32 +00:00
|
|
|
update_results(pbl, options)
|
2012-12-06 19:18:28 +00:00
|
|
|
end
|
2012-11-08 21:39:42 +00:00
|
|
|
end
|
|
|
|
|
|
|
|
end
|
|
|
|
end
|