diff options
author | Lin Jen-Shin <godfat@godfat.org> | 2016-09-21 11:12:32 +0300 |
---|---|---|
committer | Lin Jen-Shin <godfat@godfat.org> | 2016-09-21 11:12:32 +0300 |
commit | 63e03dada7e754a92ca088c683f4189424ab34b1 (patch) | |
tree | b1fa43c9dbf6bffd05c42eced7c943bcc6f3cfd7 /app/controllers/projects/builds_controller.rb | |
parent | 5869fb201459f0e44c4544076758e02299fa9227 (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.rb | 4 |
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 |