#755: remove old logs from PublishObserver
This commit is contained in:
parent
281346a546
commit
5003101211
|
@ -7,7 +7,11 @@ module AbfWorker
|
|||
BUILD_CANCELED = 4
|
||||
|
||||
def self.update_results(subject, options)
|
||||
results = (subject.results || [])+ options['results']
|
||||
results = (subject.results || []) + options['results']
|
||||
sort_results_and_save(subject, results)
|
||||
end
|
||||
|
||||
def self.sort_results_and_save(subject, results)
|
||||
subject.results = results.sort_by{ |r| r['file_name'] }
|
||||
subject.save!
|
||||
end
|
||||
|
|
|
@ -18,5 +18,13 @@ module AbfWorker
|
|||
end
|
||||
end
|
||||
|
||||
def self.update_results(subject, options)
|
||||
results = (subject.results || []).
|
||||
map{ |r| r if r['file_name'] !~ /^abfworker\:\:publish\-build\-list\-container\-worker.*\.log$/ }.
|
||||
compact
|
||||
results += options['results']
|
||||
sort_results_and_save(subject, results)
|
||||
end
|
||||
|
||||
end
|
||||
end
|
Loading…
Reference in New Issue