1
0
Fork 0
mirror of https://github.com/mperham/sidekiq.git synced 2022-11-09 13:52:34 -05:00

Merge pull request #962 from rafaelss/master

Show more information in the retry page
This commit is contained in:
Mike Perham 2013-05-30 12:49:20 -07:00
commit 20600da581
4 changed files with 21 additions and 0 deletions

View file

@ -107,6 +107,20 @@ module Sidekiq
args.map { |arg| a = arg.inspect; a.size > count ? "#{a[0..count]}..." : a }.join(", ")
end
RETRY_JOB_KEYS = [
"queue", "class", "args", "retry_count", "retried_at", "failed_at",
"retry", "jid", "error_message", "error_class", "backtrace",
"error_backtrace", "unique", "enqueued_at"
]
def retry_extra_items(retry_job)
@retry_extra_items ||= {}.tap do |extra|
retry_job.item.each do |key, value|
extra[key] = value unless RETRY_JOB_KEYS.include?(key)
end
end
end
def tabs
@tabs ||= {
"Dashboard" => '',

View file

@ -21,6 +21,7 @@ en: # <---- change this to your locale code
Class: Class
Job: Job
Arguments: Arguments
Extras: Extras
Started: Started
ShowAll: Show All
CurrentMessagesInQueue: Current messages in <span class='title'>%{queue}</span>

View file

@ -20,6 +20,7 @@
Class: Classe
Job: Tarefa
Arguments: Argumentos
Extras: Extras
Started: Iniciados
ShowAll: Mostrar todos
CurrentMessagesInQueue: Mensagens atualmenta na <span class='title'>%{queue}</span>

View file

@ -19,6 +19,11 @@ table class="retry table table-bordered table-striped"
th JID
td
code= @retry.jid
- unless retry_extra_items(@retry).empty?
tr
th = t('Extras')
td
code= display_args(retry_extra_items(@retry), 1000)
- if @retry['retry_count'] > 0
tr
th = t('RetryCount')