diff --git a/app/controllers/platforms/product_build_lists_controller.rb b/app/controllers/platforms/product_build_lists_controller.rb index 8855939ef..78e32bb8a 100644 --- a/app/controllers/platforms/product_build_lists_controller.rb +++ b/app/controllers/platforms/product_build_lists_controller.rb @@ -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? diff --git a/app/models/build_list.rb b/app/models/build_list.rb index 1a9e656d2..1a111918c 100644 --- a/app/models/build_list.rb +++ b/app/models/build_list.rb @@ -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') diff --git a/app/models/concerns/abf_worker_methods.rb b/app/models/concerns/abf_worker_methods.rb index 30f4e6e19..19b9ebeaf 100644 --- a/app/models/concerns/abf_worker_methods.rb +++ b/app/models/concerns/abf_worker_methods.rb @@ -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