Sha256: ce1e29caa52731e6627ff1b484e9903ebf6b958ff461eb1de03dda4b18c64b58

Contents?: true

Size: 1.98 KB

Versions: 11

Compression:

Stored size: 1.98 KB

Contents

<h1>Search Results</h1>
<%= scheduler_view :search_form, layout: false %>
<hr>
<% delayed = @jobs.select { |j| j['where_at'] == 'delayed' } %>
<h1>Delayed jobs</h1>
<table class='jobs'>
  <tr>
    <th></th>
    <th></th>
    <th>Timestamp</th>
    <th>Class</th>
    <th>Args</th>
  </tr>
  <% delayed.each do |job| %>
      <tr>
        <td>
          <form action="<%= u "/delayed/queue_now" %>" method="post">
            <input type="hidden" name="timestamp" value="<%= job['timestamp'].to_i %>">
            <input type="submit" value="Queue now">
          </form>
        </td>
        <td>
          <form action="<%= u "/delayed/cancel_now" %>" method="post">
            <input type="hidden" name="timestamp" value="<%= job['timestamp'].to_i %>">
            <input type="hidden" name="klass" value="<%= job['class'] %>">
            <input type="hidden" name="args" value="<%= h(ResqueAdmin.encode job['args']) %>">
            <input type="submit" value="Cancel Job">
          </form>
        </td>
        <td class='args'><%= format_time(Time.at(job['timestamp'])) %></td>
        <td class='class'><%= job['class'] %></td>
        <td class='args'><%= h job['args'].inspect %></td>
      </tr>
  <% end %>
</table>
</h1>

<% queued = @jobs.select { |j| j['where_at'] == 'queued' } %>
<h1>Queued jobs</h1>
<table class='jobs'>
  <tr>
    <th>Queue</th>
    <th>Class</th>
    <th>Args</th>
  </tr>
  <% queued.each do |job| %>
  <tr>
    <td class='class'><%= job['queue'] %></td>
    <td class='class'><%= job['class'] %></td>
    <td class='args'><%= h job['args'].inspect %></td>
  </tr>
  <% end %>
</table>

<% working = @jobs.select { |j| j['where_at'] == 'working' } %>
<h1>Working jobs</h1>
<table class='jobs'>
  <tr>
    <th>Queue</th>
    <th>Class</th>
    <th>Args</th>
  </tr>
  <% working.each do |job| %>
  <tr>
    <td class='class'><%= job['queue'] %></td>
    <td class='class'><%= job['class'] %></td>
    <td class='args'><%= h job['args'].inspect %></td>
  </tr>
  <% end %>
</table>


Version data entries

11 entries across 9 versions & 2 rubygems

Version Path
resque_admin-scheduler-1.2.0 lib/resque_admin/scheduler/server/views/search.erb
resque_admin-scheduler-1.1.9 lib/resque_admin/scheduler/server/views/search.erb
resque_admin-scheduler-1.1.8 lib/resque_admin/scheduler/server/views/search.erb
resque_admin-scheduler-1.1.7 lib/resque_admin/scheduler/server/views/search.erb
resque_admin-scheduler-1.0.4 lib/resque_admin/scheduler/server/views/search.erb
resque_admin-scheduler-1.0.3 lib/resque-admin/scheduler/server/views/search.erb
resque_admin-scheduler-1.3.0 lib/resque_admin/scheduler/server/views/search.erb
resque-admin-scheduler-1.3.0 lib/resque_admin/scheduler/server/views/search.erb
resque-admin-scheduler-1.3.0 lib/resque/scheduler/server/views/search.erb
resque-admin-scheduler-4.3.0 lib/resque_admin/scheduler/server/views/search.erb
resque-admin-scheduler-4.3.0 lib/resque/scheduler/server/views/search.erb