diff --git a/app/assets/javascripts/angularjs/build_lists/build_log_controller.js.coffee b/app/assets/javascripts/angularjs/build_lists/build_log_controller.js.coffee index df00b82e1..7335c76ae 100644 --- a/app/assets/javascripts/angularjs/build_lists/build_log_controller.js.coffee +++ b/app/assets/javascripts/angularjs/build_lists/build_log_controller.js.coffee @@ -12,7 +12,7 @@ RosaABF.controller 'BuildLogController', ['$scope', '$http', '$timeout', ($scope return unless $scope.build_started if $('.build-log').is(':visible') - $http.get($scope.path).success((res) -> + $http.get($scope.path, timeout: 30000).success((res) -> $scope.log = res.log $scope.build_started = res.building ).error(-> diff --git a/app/controllers/platforms/product_build_lists_controller.rb b/app/controllers/platforms/product_build_lists_controller.rb index 78e32bb8a..8855939ef 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 + worker_log = @product_build_list.abf_worker_log.truncate(40000) render json: { log: (Pygments.highlight(worker_log, lexer: 'sh') rescue worker_log), building: @product_build_list.build_started? diff --git a/app/controllers/projects/build_lists_controller.rb b/app/controllers/projects/build_lists_controller.rb index c0e0f372a..f89f004f0 100644 --- a/app/controllers/projects/build_lists_controller.rb +++ b/app/controllers/projects/build_lists_controller.rb @@ -171,7 +171,7 @@ class Projects::BuildListsController < Projects::BaseController def log render json: { - log: @build_list.log(params[:load_lines]), + log: @build_list.log, building: @build_list.build_started? } end diff --git a/app/models/build_list.rb b/app/models/build_list.rb index 602e8ab60..1a9e656d2 100644 --- a/app/models/build_list.rb +++ b/app/models/build_list.rb @@ -519,9 +519,9 @@ class BuildList < ActiveRecord::Base build_published? end - def log(load_lines) + def log(load_lines=nil) if new_core? - worker_log = abf_worker_log + worker_log = abf_worker_log.truncate(40000) Pygments.highlight(worker_log, lexer: 'sh') rescue worker_log else I18n.t('layout.build_lists.log.not_available')