small refactoring
This commit is contained in:
parent
d483b5929e
commit
2ff3c581b3
|
@ -39,7 +39,7 @@ class Platforms::ProductBuildListsController < Platforms::BaseController
|
|||
end
|
||||
|
||||
def log
|
||||
worker_log = @product_build_list.abf_worker_log.truncate(40000)
|
||||
worker_log = @product_build_list.abf_worker_log
|
||||
render json: {
|
||||
log: (Pygments.highlight(worker_log, lexer: 'sh') rescue worker_log),
|
||||
building: @product_build_list.build_started?
|
||||
|
|
|
@ -521,7 +521,7 @@ class BuildList < ActiveRecord::Base
|
|||
|
||||
def log(load_lines=nil)
|
||||
if new_core?
|
||||
worker_log = abf_worker_log.truncate(40000)
|
||||
worker_log = abf_worker_log
|
||||
Pygments.highlight(worker_log, lexer: 'sh') rescue worker_log
|
||||
else
|
||||
I18n.t('layout.build_lists.log.not_available')
|
||||
|
|
|
@ -18,7 +18,7 @@ module AbfWorkerMethods
|
|||
end
|
||||
|
||||
def abf_worker_log
|
||||
self.class.log_server.get(service_queue) || I18n.t('layout.build_lists.log.not_available')
|
||||
(self.class.log_server.get(service_queue) || I18n.t('layout.build_lists.log.not_available')).truncate(40000)
|
||||
end
|
||||
|
||||
def add_job_to_abf_worker_queue
|
||||
|
|
Loading…
Reference in New Issue