Sha256: 5905f68855359d60e7ace8325557adfb79eb3948a46e05a02aea6565759fa6cc

Contents?: true

Size: 1.97 KB

Versions: 8

Compression:

Stored size: 1.97 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(Resque.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

8 entries across 8 versions & 4 rubygems

Version Path
resque-scheduler-4.5.0 lib/resque/scheduler/server/views/search.erb
istox-resque-scheduler-1.0.0.pre lib/resque/scheduler/server/views/search.erb
resque-scheduler-4.4.0 lib/resque/scheduler/server/views/search.erb
resque-scheduler-4.3.1 lib/resque/scheduler/server/views/search.erb
resque_admin-scheduler-1.0.2 lib/resque/scheduler/server/views/search.erb
resque-admin-scheduler-1.0.2 lib/resque/scheduler/server/views/search.erb
resque-scheduler-4.3.0 lib/resque/scheduler/server/views/search.erb
resque-scheduler-4.2.1 lib/resque/scheduler/server/views/search.erb