hot fix for PublishObserver
This commit is contained in:
parent
555315b1ce
commit
a1444cad6b
|
@ -3,8 +3,7 @@ module AbfWorker
|
|||
@queue = :publish_observer
|
||||
|
||||
|
||||
class << self
|
||||
def perform(options)
|
||||
def self.perform(options)
|
||||
status = options['status'].to_i
|
||||
return if status == STARTED # do nothing when publication started
|
||||
if options['type'] == 'resign'
|
||||
|
@ -14,9 +13,7 @@ module AbfWorker
|
|||
end
|
||||
end
|
||||
|
||||
protected
|
||||
|
||||
def update_rpm_builds(options)
|
||||
def self.update_rpm_builds(options)
|
||||
build_lists = BuildList.where(:id => options['build_list_ids'])
|
||||
build_lists.each do |bl|
|
||||
update_results(bl, options)
|
||||
|
@ -34,14 +31,15 @@ module AbfWorker
|
|||
AbfWorker::BuildListsPublishTaskManager.unlock_rep_and_platform bl
|
||||
end
|
||||
|
||||
class << self
|
||||
protected
|
||||
|
||||
def update_results(subject, options)
|
||||
results = (subject.results || []).
|
||||
select{ |r| r['file_name'] !~ /^abfworker\:\:publish\-worker.*\.log$/ }
|
||||
results |= options['results']
|
||||
sort_results_and_save(subject, results)
|
||||
end
|
||||
|
||||
end
|
||||
|
||||
end
|
||||
end
|
Loading…
Reference in New Issue