1
0
Fork 0
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:
Mike Perham 2022-04-08 12:08:50 -07:00
parent 653c398fc3
commit 152c3d8104

View file

@ -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