Skip to content

Commit

Permalink
standard formatting
Browse files Browse the repository at this point in the history
  • Loading branch information
mperham committed Jan 6, 2022
1 parent 96816c3 commit 63f6e68
Show file tree
Hide file tree
Showing 4 changed files with 18 additions and 18 deletions.
22 changes: 11 additions & 11 deletions Gemfile.lock
Expand Up @@ -106,8 +106,8 @@ GEM
nokogiri (1.11.2)
mini_portile2 (~> 2.5.0)
racc (~> 1.4)
parallel (1.20.1)
parser (3.0.1.1)
parallel (1.21.0)
parser (3.1.0.0)
ast (~> 2.4.1)
racc (1.5.2)
rack (2.2.3)
Expand Down Expand Up @@ -142,20 +142,20 @@ GEM
rainbow (3.0.0)
rake (13.0.3)
redis (4.2.5)
regexp_parser (2.1.1)
regexp_parser (2.2.0)
rexml (3.2.5)
rubocop (1.14.0)
rubocop (1.24.1)
parallel (~> 1.10)
parser (>= 3.0.0.0)
rainbow (>= 2.2.2, < 4.0)
regexp_parser (>= 1.8, < 3.0)
rexml
rubocop-ast (>= 1.5.0, < 2.0)
rubocop-ast (>= 1.15.1, < 2.0)
ruby-progressbar (~> 1.7)
unicode-display_width (>= 1.4.0, < 3.0)
rubocop-ast (1.5.0)
rubocop-ast (1.15.1)
parser (>= 3.0.1.1)
rubocop-performance (1.11.2)
rubocop-performance (1.13.1)
rubocop (>= 1.7.0, < 2.0)
rubocop-ast (>= 0.4.0)
ruby-progressbar (1.11.0)
Expand All @@ -171,14 +171,14 @@ GEM
activesupport (>= 4.0)
sprockets (>= 3.0.0)
sqlite3 (1.4.2)
standard (1.1.1)
rubocop (= 1.14.0)
rubocop-performance (= 1.11.2)
standard (1.6.0)
rubocop (= 1.24.1)
rubocop-performance (= 1.13.1)
thor (1.1.0)
toxiproxy (1.0.3)
tzinfo (2.0.4)
concurrent-ruby (~> 1.0)
unicode-display_width (2.0.0)
unicode-display_width (2.1.0)
websocket-driver (0.7.3)
websocket-extensions (>= 0.1.0)
websocket-extensions (0.1.5)
Expand Down
8 changes: 4 additions & 4 deletions lib/sidekiq/api.rb
Expand Up @@ -819,10 +819,10 @@ def each

hash = Sidekiq.load_json(info)
yield Process.new(hash.merge("busy" => busy.to_i,
"beat" => at_s.to_f,
"quiet" => quiet,
"rss" => rss.to_i,
"rtt_us" => rtt.to_i))
"beat" => at_s.to_f,
"quiet" => quiet,
"rss" => rss.to_i,
"rtt_us" => rtt.to_i))
end
end

Expand Down
4 changes: 2 additions & 2 deletions lib/sidekiq/job_util.rb
Expand Up @@ -34,7 +34,7 @@ def normalize_item(item)
# merge in the default sidekiq_options for the item's class and/or wrapped element
# this allows ActiveJobs to control sidekiq_options too.
defaults = normalized_hash(item["class"])
defaults = defaults.merge(item["wrapped"].get_sidekiq_options) if item["wrapped"].respond_to?("get_sidekiq_options")
defaults = defaults.merge(item["wrapped"].get_sidekiq_options) if item["wrapped"].respond_to?(:get_sidekiq_options)
item = defaults.merge(item)

raise(ArgumentError, "Job must include a valid queue name") if item["queue"].nil? || item["queue"] == ""
Expand All @@ -49,7 +49,7 @@ def normalize_item(item)

def normalized_hash(item_class)
if item_class.is_a?(Class)
raise(ArgumentError, "Message must include a Sidekiq::Worker class, not class name: #{item_class.ancestors.inspect}") unless item_class.respond_to?("get_sidekiq_options")
raise(ArgumentError, "Message must include a Sidekiq::Worker class, not class name: #{item_class.ancestors.inspect}") unless item_class.respond_to?(:get_sidekiq_options)
item_class.get_sidekiq_options
else
Sidekiq.default_worker_options
Expand Down
2 changes: 1 addition & 1 deletion lib/sidekiq/web/application.rb
Expand Up @@ -299,7 +299,7 @@ def call(env)
return [404, {"Content-Type" => "text/plain", "X-Cascade" => "pass"}, ["Not Found"]] unless action

app = @klass
resp = catch(:halt) do # rubocop:disable Standard/SemanticBlocks
resp = catch(:halt) do
self.class.run_befores(app, action)
action.instance_exec env, &action.block
ensure
Expand Down

0 comments on commit 63f6e68

Please sign in to comment.