2012-11-26 18:00:29 +00:00
|
|
|
module AbfWorker
|
|
|
|
class RpmWorkerObserver
|
|
|
|
@queue = :rpm_worker_observer
|
|
|
|
|
|
|
|
def self.perform(options)
|
|
|
|
bl = BuildList.find options['id']
|
2012-11-27 14:22:17 +00:00
|
|
|
status = options['status'].to_i
|
|
|
|
case status
|
2012-11-26 18:00:29 +00:00
|
|
|
when 0
|
|
|
|
bl.build_success
|
|
|
|
when 1
|
|
|
|
bl.build_error
|
|
|
|
when 3
|
2012-11-27 14:22:17 +00:00
|
|
|
bl.bs_id = bl.id
|
|
|
|
bl.save
|
2012-11-26 18:00:29 +00:00
|
|
|
bl.start_build
|
|
|
|
end
|
2012-11-27 14:22:17 +00:00
|
|
|
if status != 3
|
|
|
|
bl.results = options['results']
|
|
|
|
bl.save
|
|
|
|
end
|
2012-11-26 18:00:29 +00:00
|
|
|
end
|
|
|
|
|
|
|
|
end
|
|
|
|
end
|