Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 14 additions & 0 deletions lib/sidekiq/web.rb
Original file line number Diff line number Diff line change
Expand Up @@ -107,6 +107,20 @@ def display_args(args, count=100)
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" => '',
Expand Down
1 change: 1 addition & 0 deletions web/locales/en.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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>
Expand Down
1 change: 1 addition & 0 deletions web/locales/pt-br.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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>
Expand Down
5 changes: 5 additions & 0 deletions web/views/retry.slim
Original file line number Diff line number Diff line change
Expand Up @@ -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')
Expand Down