summaryrefslogtreecommitdiff
path: root/app/views/notify
diff options
context:
space:
mode:
authorKamil Trzciński <ayufan@ayufan.eu>2017-04-06 16:20:27 +0000
committerRémy Coutable <remy@rymai.me>2017-04-06 16:20:27 +0000
commit828d81ee1f6aaaf6ab9de1ed0c675ff961831c17 (patch)
treea8e9ba81f60e1185a86920ace8b9b2e9352e8ce9 /app/views/notify
parent514dc1a0848616b93e8910c6c48eea4f64391884 (diff)
downloadgitlab-ce-828d81ee1f6aaaf6ab9de1ed0c675ff961831c17.tar.gz
Optimise trace handling code to use streaming instead of full read
Diffstat (limited to 'app/views/notify')
-rw-r--r--app/views/notify/pipeline_failed_email.html.haml2
-rw-r--r--app/views/notify/pipeline_failed_email.text.erb2
2 files changed, 2 insertions, 2 deletions
diff --git a/app/views/notify/pipeline_failed_email.html.haml b/app/views/notify/pipeline_failed_email.html.haml
index 4beb6fcee5d..a83faa839df 100644
--- a/app/views/notify/pipeline_failed_email.html.haml
+++ b/app/views/notify/pipeline_failed_email.html.haml
@@ -137,6 +137,6 @@
- if build.has_trace?
%td{ colspan: "2", style: "font-family:'Helvetica Neue',Helvetica,Arial,sans-serif;padding:0 0 15px;" }
%pre{ style: "font-family:Monaco,'Lucida Console','Courier New',Courier,monospace;background-color:#fafafa;border-radius:3px;overflow:hidden;white-space:pre-wrap;word-break:break-all;font-size:13px;line-height:1.4;padding:12px;color:#333333;margin:0;" }
- = build.trace_html(last_lines: 10).html_safe
+ = build.trace.html(last_lines: 10).html_safe
- else
%td{ colspan: "2" }
diff --git a/app/views/notify/pipeline_failed_email.text.erb b/app/views/notify/pipeline_failed_email.text.erb
index c1a4ea40cf5..294238eee51 100644
--- a/app/views/notify/pipeline_failed_email.text.erb
+++ b/app/views/notify/pipeline_failed_email.text.erb
@@ -35,7 +35,7 @@ had <%= failed.size %> failed <%= 'build'.pluralize(failed.size) %>.
Stage: <%= build.stage %>
Name: <%= build.name %>
<% if build.has_trace? -%>
-Trace: <%= build.trace_with_state(last_lines: 10)[:text] %>
+Trace: <%= build.trace.raw(last_lines: 10) %>
<% end -%>
<% end -%>