<% wu = obj.work_unit(name) %> <% render_log = wu.render_log %> <% if render_log %>
<% log_url = url_for render_log[:log] %>

Download the log

<%= render(partial: render_log[:partial], locals: render_log[:locals]) %>
<% end %> <% live_log_lines = wu.live_log_lines(Rails.configuration.running_job_log_records_to_fetch).join("\n") %> <% if !render_log or (live_log_lines.size > 0) %> <%# Still running, or recently finished and logs are still available from logs table %> <%# Show recent logs in terminal window %>

Recent logs

<%= live_log_lines %>
<%# Applying a long throttle suppresses the auto-refresh of this partial that would normally be triggered by arv-log-event. %>
>
<% end %>