<commit_before><%start = params[:start].to_i %>
<%failed = Resque::Failure.all(start, 20)%>
<% index = 0 %>

<h1>Failed Jobs</h1>
<%unless failed.empty?%>
<form method="POST" action="<%=u 'failed/clear'%>" class='clear-failed'>
  <input type='submit' name='' value='Clear Failed Jobs' />
</form>
<%end%>

<p class='sub'>Showing <%=start%> to <%= start + 20 %> of <b><%= size = Resque::Failure.count %></b> jobs</p>

<ul class='failed'>
  <%for job in failed%>
    <% index += 1 %>
    <li>
      <dl>
        <dt>Worker</dt>
        <dd>
          <a href="<%= url(:workers, job['worker']) %>"><%= job['worker'].split(':')[0...2].join(':') %></a> on <b class='queue-tag'><%= job['queue'] %></b > at <b><span class="time"><%= job['failed_at'] %></span></b>
          <div class='retry'>
            <% if job['retried_at'] %>
              Retried <b><span class="time"><%= job['retried_at'] %></span></b>
            <% else %>
              <a href="<%= u "failed/requeue/#{start + index - 1}" %>" rel="retry">Retry</a>
            <% end %>
          </div>
        </dd>
        <dt>Class</dt>
        <dd><code><%= job['payload']['class'] %></code></dd>
        <dt>Arguments</dt>
        <dd><pre><%=h show_args(job['payload']['args']) %></pre></dd>
        <dt>Exception</td>
        <dd><code><%= job['exception'] %></code></dd>
        <dt>Error</dt>
        <dd class='error'>
          <a href="#" class="backtrace"><%= h(job['error']) %></a>
          <pre style='display:none'><%=h job['backtrace'].join("\n") %></pre>
        </dd>
      </dl>
      <div class='r'>
      </div>
    </li>
  <%end%>
</ul>

<%= partial :next_more, :start => start, :size => size %>

<commit_msg>Some errors don't have backtraces preventing /failed to render in the web service.  Check instead to see if there is a backtrace and then render accordingly.<commit_after><%start = params[:start].to_i %>
<%failed = Resque::Failure.all(start, 20)%>
<% index = 0 %>

<h1>Failed Jobs</h1>
<%unless failed.empty?%>
<form method="POST" action="<%=u 'failed/clear'%>" class='clear-failed'>
  <input type='submit' name='' value='Clear Failed Jobs' />
</form>
<%end%>

<p class='sub'>Showing <%=start%> to <%= start + 20 %> of <b><%= size = Resque::Failure.count %></b> jobs</p>

<ul class='failed'>
  <%for job in failed%>
    <% index += 1 %>
    <li>
      <dl>
        <dt>Worker</dt>
        <dd>
          <a href="<%= url(:workers, job['worker']) %>"><%= job['worker'].split(':')[0...2].join(':') %></a> on <b class='queue-tag'><%= job['queue'] %></b > at <b><span class="time"><%= job['failed_at'] %></span></b>
          <div class='retry'>
            <% if job['retried_at'] %>
              Retried <b><span class="time"><%= job['retried_at'] %></span></b>
            <% else %>
              <a href="<%= u "failed/requeue/#{start + index - 1}" %>" rel="retry">Retry</a>
            <% end %>
          </div>
        </dd>
        <dt>Class</dt>
        <dd><code><%= job['payload']['class'] %></code></dd>
        <dt>Arguments</dt>
        <dd><pre><%=h show_args(job['payload']['args']) %></pre></dd>
        <dt>Exception</td>
        <dd><code><%= job['exception'] %></code></dd>
        <dt>Error</dt>
        <dd class='error'>
          <% if job['backtrace'] %>
            <a href="#" class="backtrace"><%= h(job['error']) %></a>
            <pre style='display:none'><%=h job['backtrace'].join("\n") %></pre>
          <% else %>
            <%=h job['error'] %>
          <% end %>
        </dd>
      </dl>
      <div class='r'>
      </div>
    </li>
  <%end%>
</ul>

<%= partial :next_more, :start => start, :size => size %>


{'fraction_non_alphanumeric': 0.2691039032435404, 'fraction_numerical': 0.006047278724573941, 'mean_word_length': 2.6281156530408776, 'pattern_counts': {'":': 0, '<': 187, '<?xml version=': 0, '>': 191, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '3465328', 'n_tokens_mistral': 1366, 'n_tokens_neox': 1265, 'n_words': 275}