rosa-build/lib/abf_worker/base_observer.rb

16 lines
365 B
Ruby
Raw Normal View History

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