added delayed job listing

This commit is contained in:
albert
2012-04-18 18:16:21 -04:00
parent 230dc91b2a
commit 51ef3e46c2
4 changed files with 36 additions and 0 deletions

View File

@@ -0,0 +1,5 @@
class DelayedJobsController < ApplicationController
def index
@delayed_jobs = Delayed::Job.order("created_at desc").paginate(params[:page])
end
end

View File

@@ -0,0 +1,28 @@
<h1>Delayed Jobs</h1>
<table class="striped" width="100%">
<thead>
<tr>
<th>Handler</th>
<th>Attempts</th>
<th>Priority</th>
<th>Last error</th>
<th>Run at</th>
<th>Failed at</th>
</tr>
</thead>
<tbody>
<% @delayed_jobs.each do |job| %>
<tr>
<td><%= job.handler %></td>
<td><%= job.attempts %></td>
<td><%= job.priority %></td>
<td><%= job.last_error %></td>
<td><%= job.run_at %></td>
<td><%= job.failed_at %></td>
</tr>
<% end %>
</tbody>
</table>
<%= numbered_paginator(@delayed_jobs) %>

View File

@@ -92,6 +92,8 @@
<ul>
<li><h1>Admin</h1></li>
<li><%= link_to("Mod Actions", mod_actions_path) %></li>
<li><%= link_to("Jobs", delayed_jobs_path) %></li>
<% if CurrentUser.is_admin? %>
<li><%= link_to("Janitor Trials", janitor_trials_path) %></li>
<li><%= link_to("IP Bans", ip_bans_path) %></li>

View File

@@ -67,6 +67,7 @@ Danbooru::Application.routes.draw do
get :search
end
end
resources :delayed_jobs, :only => [:index]
resources :dmails do
collection do
get :search