From 51ef3e46c2b7a4aa8a11f07246d054a3085b0fb6 Mon Sep 17 00:00:00 2001 From: albert Date: Wed, 18 Apr 2012 18:16:21 -0400 Subject: [PATCH] added delayed job listing --- app/controllers/delayed_jobs_controller.rb | 5 ++++ app/views/delayed_jobs/index.html.erb | 28 ++++++++++++++++++++++ app/views/static/site_map.html.erb | 2 ++ config/routes.rb | 1 + 4 files changed, 36 insertions(+) create mode 100644 app/controllers/delayed_jobs_controller.rb create mode 100644 app/views/delayed_jobs/index.html.erb diff --git a/app/controllers/delayed_jobs_controller.rb b/app/controllers/delayed_jobs_controller.rb new file mode 100644 index 000000000..90d6f03c3 --- /dev/null +++ b/app/controllers/delayed_jobs_controller.rb @@ -0,0 +1,5 @@ +class DelayedJobsController < ApplicationController + def index + @delayed_jobs = Delayed::Job.order("created_at desc").paginate(params[:page]) + end +end diff --git a/app/views/delayed_jobs/index.html.erb b/app/views/delayed_jobs/index.html.erb new file mode 100644 index 000000000..ae10b8d8a --- /dev/null +++ b/app/views/delayed_jobs/index.html.erb @@ -0,0 +1,28 @@ +

Delayed Jobs

+ + + + + + + + + + + + + + <% @delayed_jobs.each do |job| %> + + + + + + + + + <% end %> + +
HandlerAttemptsPriorityLast errorRun atFailed at
<%= job.handler %><%= job.attempts %><%= job.priority %><%= job.last_error %><%= job.run_at %><%= job.failed_at %>
+ +<%= numbered_paginator(@delayed_jobs) %> diff --git a/app/views/static/site_map.html.erb b/app/views/static/site_map.html.erb index 80b1686b9..5b217ddfb 100644 --- a/app/views/static/site_map.html.erb +++ b/app/views/static/site_map.html.erb @@ -92,6 +92,8 @@