Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLin Jen-Shin <godfat@godfat.org>2016-09-21 11:12:32 +0300
committerLin Jen-Shin <godfat@godfat.org>2016-09-21 11:12:32 +0300
commit63e03dada7e754a92ca088c683f4189424ab34b1 (patch)
treeb1fa43c9dbf6bffd05c42eced7c943bcc6f3cfd7 /app/controllers/projects/builds_controller.rb
parent5869fb201459f0e44c4544076758e02299fa9227 (diff)
Make various trace methods take last_lines argument:
So that we could read last few lines rather than read the entire file which could be huge.
Diffstat (limited to 'app/controllers/projects/builds_controller.rb')
-rw-r--r--app/controllers/projects/builds_controller.rb4
1 files changed, 3 insertions, 1 deletions
diff --git a/app/controllers/projects/builds_controller.rb b/app/controllers/projects/builds_controller.rb
index f13fb1df373..6069e620ba2 100644
--- a/app/controllers/projects/builds_controller.rb
+++ b/app/controllers/projects/builds_controller.rb
@@ -43,7 +43,9 @@ class Projects::BuildsController < Projects::ApplicationController
def trace
respond_to do |format|
format.json do
- render json: @build.trace_with_state(params[:state].presence).merge!(id: @build.id, status: @build.status)
+ state = params[:state].presence
+ render json: @build.trace_with_state(state: state).
+ merge!(id: @build.id, status: @build.status)
end
end
end