Skip to content

Commit

Permalink
Pet rubocop
Browse files Browse the repository at this point in the history
  • Loading branch information
smortex committed May 29, 2024
1 parent f4e4e9c commit 2fe0e27
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 8 deletions.
6 changes: 2 additions & 4 deletions lib/riemann/tools/http_check.rb
Original file line number Diff line number Diff line change
Expand Up @@ -128,10 +128,8 @@ def tick
def test_uri_addresses(uri, addresses)
request = get_request(uri)

responses = []

addresses.each do |address|
responses << test_uri_address(uri, address.to_s, request)
responses = addresses.map do |address|
test_uri_address(uri, address.to_s, request)
end

responses.compact!
Expand Down
6 changes: 2 additions & 4 deletions tools/riemann-docker/lib/riemann/tools/docker.rb
Original file line number Diff line number Diff line change
Expand Up @@ -171,10 +171,8 @@ def tick
disk if @disk_enabled

# Get CPU, Memory and Load of each container
threads = []

containers.each do |ctr|
threads << Thread.new(ctr) do |container|
threads = containers.map do |ctr|
Thread.new(ctr) do |container|
id = container.id
name = get_container_name(container)

Expand Down

0 comments on commit 2fe0e27

Please sign in to comment.