Sha256: 96b5e5be49c9764307295751818522cfc70a0f4882e10556f73e0d5590ab00f5

Contents?: true

Size: 1.16 KB

Versions: 5

Compression:

Stored size: 1.16 KB

Contents

<% @subtabs = %w( resque redis keys ) %>

<% if params[:key] %>

<%= partial :key %>

<% elsif params[:id] == "resque" %>

  <h1><%= resque %></h1>
  <table class='stats'>
  <% for key, value in resque.info.to_a.sort_by { |i| i[0].to_s } %>
    <tr>
      <th>
        <%= key %>
      </th>
      <td>
        <%= value %>
      </td>
    </tr>
  <% end %>
  </table>

<% elsif params[:id] == 'redis' %>

  <h1><%= resque.redis.server %></h1>
  <table class='stats'>
  <% for key, value in resque.redis.info.to_a.sort_by { |i| i[0].to_s } %>
    <tr>
      <th>
        <%= key %>
      </th>
      <td>
        <%= value %>
      </td>
    </tr>
  <% end %>
  </table>
  
<% elsif params[:id] == 'keys' %>

  <h1>Keys owned by <%= resque %></h1>
  <p class='sub'>(All keys are actually prefixed with "resque:")</p>
  <table class='stats'>
    <tr>
      <th>key</th>
      <th>type</th>
      <th>size</th>
    </tr>
  <% for key in resque.keys.sort %>
    <tr>
      <th>
        <a href="/stats/keys/<%= key %>"><%= key %></a>
      </th>
      <td><%= resque.redis.type key %></td>
      <td><%= redis_get_size key %></td>
    </tr>
  <% end %>
  </table>

<% else %>

<% end %>

Version data entries

5 entries across 5 versions & 2 rubygems

Version Path
resque-1.2.3 lib/resque/server/views/stats.erb
resque-1.2.1 lib/resque/server/views/stats.erb
resque-1.2.0 lib/resque/server/views/stats.erb
jerefrer-resque-1.1.0 lib/resque/server/views/stats.erb
resque-1.1.0 lib/resque/server/views/stats.erb