mirror of
https://github.com/mperham/sidekiq.git
synced 2022-11-09 13:52:34 -05:00
fix code formatting
This commit is contained in:
parent
653c398fc3
commit
152c3d8104
1 changed files with 25 additions and 25 deletions
|
@ -354,31 +354,31 @@ module Sidekiq
|
|||
def display_args
|
||||
# Unwrap known wrappers so they show up in a human-friendly manner in the Web UI
|
||||
@display_args ||= case klass
|
||||
when /\ASidekiq::Extensions::Delayed/
|
||||
safe_load(args[0], args) do |_, _, arg, kwarg|
|
||||
if !kwarg || kwarg.empty?
|
||||
arg
|
||||
else
|
||||
[arg, kwarg]
|
||||
end
|
||||
end
|
||||
when "ActiveJob::QueueAdapters::SidekiqAdapter::JobWrapper"
|
||||
job_args = self["wrapped"] ? args[0]["arguments"] : []
|
||||
if (self["wrapped"] || args[0]) == "ActionMailer::DeliveryJob"
|
||||
# remove MailerClass, mailer_method and 'deliver_now'
|
||||
job_args.drop(3)
|
||||
elsif (self["wrapped"] || args[0]) == "ActionMailer::MailDeliveryJob"
|
||||
# remove MailerClass, mailer_method and 'deliver_now'
|
||||
job_args.drop(3).first["args"]
|
||||
else
|
||||
job_args
|
||||
end
|
||||
else
|
||||
if self["encrypt"]
|
||||
# no point in showing 150+ bytes of random garbage
|
||||
args[-1] = "[encrypted data]"
|
||||
end
|
||||
args
|
||||
when /\ASidekiq::Extensions::Delayed/
|
||||
safe_load(args[0], args) do |_, _, arg, kwarg|
|
||||
if !kwarg || kwarg.empty?
|
||||
arg
|
||||
else
|
||||
[arg, kwarg]
|
||||
end
|
||||
end
|
||||
when "ActiveJob::QueueAdapters::SidekiqAdapter::JobWrapper"
|
||||
job_args = self["wrapped"] ? args[0]["arguments"] : []
|
||||
if (self["wrapped"] || args[0]) == "ActionMailer::DeliveryJob"
|
||||
# remove MailerClass, mailer_method and 'deliver_now'
|
||||
job_args.drop(3)
|
||||
elsif (self["wrapped"] || args[0]) == "ActionMailer::MailDeliveryJob"
|
||||
# remove MailerClass, mailer_method and 'deliver_now'
|
||||
job_args.drop(3).first["args"]
|
||||
else
|
||||
job_args
|
||||
end
|
||||
else
|
||||
if self["encrypt"]
|
||||
# no point in showing 150+ bytes of random garbage
|
||||
args[-1] = "[encrypted data]"
|
||||
end
|
||||
args
|
||||
end
|
||||
end
|
||||
|
||||
|
|
Loading…
Reference in a new issue