<commit_before><% if params[:id] && worker = Resque::Worker.find(params[:id]) %>
  <h1><%= worker %>'s job</h1>
  
  <table>
    <tr>
      <th>&nbsp;</th>
      <th>Where</th>
      <th>Queue</th>
      <th>Started</th>      
      <th>Class</th>
      <th>Args</th>
    </tr>
      <tr>
        <td><img src="/working.png" alt="working" title="working"></td>
        <% host, pid, _ = worker.to_s.split(':') %>
        <td><a href="/workers/<%= worker %>"><%= host %>:<%= pid %></a></td>
        <% data = worker.job %>
        <% queue = data['queue'] %>
        <td><a class="queue" href="/queues/<%= queue %>"><%= queue %></a></td>
        <td><span class="time"><%= data['run_at'] %></span></td>        
        <td>      
          <code><%= data['payload']['class'] %></code>
        </td>
        <td><%=h data['payload']['args'].inspect %></td>
      </tr>
  </table>

<% else %>

  <% workers = resque.working %>
  <h1>Workers Working (<%= workers.size %>)</h1>
  <table>
    <tr>
      <th>&nbsp;</th>
      <th>Where</th>
      <th>Queue</th>        
      <th>Processing</th>    
    </tr>
    <% if working.empty? %>
    <tr>
      <td colspan="4">Not a one.</td>
    </tr>
    <% end %>
    
    <% for worker in workers.sort_by { |w| w.job['run_at'] ? w.job['run_at'] : '' } %>
      <% job = worker.job %>
      <tr>
        <td><img src="/<%= state = worker.state %>.png" alt="<%= state %>" title="<%= state %>"></td>
        <% host, pid, queues = worker.to_s.split(':') %>
        <td><a href="/workers/<%= worker %>"><%= host %>:<%= pid %></a></td>
        <td>
          <a class="queue" href="/queues/<%= job['queue'] %>"><%= job['queue'] %></a>
        </td>
        <td>      
          <% if job['queue'] %>
            <code><%= job['payload']['class'] %></code>
            <small><a class="queue time" href="/working/<%= worker %>"><%= job['run_at'] %></a></small>
          <% else %>
            Waiting for more
          <% end %>
        </td>
      </tr>
    <% end %>
  </table>

<% end %>
<commit_msg>Don't check variable that doesn't exist<commit_after><% if params[:id] && worker = Resque::Worker.find(params[:id]) %>
  <h1><%= worker %>'s job</h1>
  
  <table>
    <tr>
      <th>&nbsp;</th>
      <th>Where</th>
      <th>Queue</th>
      <th>Started</th>      
      <th>Class</th>
      <th>Args</th>
    </tr>
      <tr>
        <td><img src="/working.png" alt="working" title="working"></td>
        <% host, pid, _ = worker.to_s.split(':') %>
        <td><a href="/workers/<%= worker %>"><%= host %>:<%= pid %></a></td>
        <% data = worker.job %>
        <% queue = data['queue'] %>
        <td><a class="queue" href="/queues/<%= queue %>"><%= queue %></a></td>
        <td><span class="time"><%= data['run_at'] %></span></td>        
        <td>      
          <code><%= data['payload']['class'] %></code>
        </td>
        <td><%=h data['payload']['args'].inspect %></td>
      </tr>
  </table>

<% else %>

  <% workers = resque.working %>
  <h1>Workers Working (<%= workers.size %>)</h1>
  <table>
    <tr>
      <th>&nbsp;</th>
      <th>Where</th>
      <th>Queue</th>        
      <th>Processing</th>    
    </tr>
    <% if workers.empty? %>
    <tr>
      <td colspan="4">Not a one.</td>
    </tr>
    <% end %>
    
    <% for worker in workers.sort_by { |w| w.job['run_at'] ? w.job['run_at'] : '' } %>
      <% job = worker.job %>
      <tr>
        <td><img src="/<%= state = worker.state %>.png" alt="<%= state %>" title="<%= state %>"></td>
        <% host, pid, queues = worker.to_s.split(':') %>
        <td><a href="/workers/<%= worker %>"><%= host %>:<%= pid %></a></td>
        <td>
          <a class="queue" href="/queues/<%= job['queue'] %>"><%= job['queue'] %></a>
        </td>
        <td>      
          <% if job['queue'] %>
            <code><%= job['payload']['class'] %></code>
            <small><a class="queue time" href="/working/<%= worker %>"><%= job['run_at'] %></a></small>
          <% else %>
            Waiting for more
          <% end %>
        </td>
      </tr>
    <% end %>
  </table>

<% end %>

{'fraction_non_alphanumeric': 0.2719298245614035, 'fraction_numerical': 0.0024366471734892786, 'mean_word_length': 1.9832848837209303, 'pattern_counts': {'":': 0, '<': 237, '<?xml version=': 0, '>': 237, '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': '1990995', 'n_tokens_mistral': 1588, 'n_tokens_neox': 1461, 'n_words': 285}