Skip to content

Commit

Permalink
Pet rubocop
Browse files Browse the repository at this point in the history
  • Loading branch information
smortex committed Dec 3, 2023
1 parent c8186eb commit 9d99f9e
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion lib/riemann/tools.rb
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ def report(event)
event[:tags] = [*event.fetch(:tags, [])] + options[:tag].map(&:dup)
end

event[:ttl] ||= (options[:ttl] || (options[:interval] * 2))
event[:ttl] ||= options[:ttl] || (options[:interval] * 2)

event[:host] = options[:event_host].dup if options[:event_host]

Expand Down
2 changes: 1 addition & 1 deletion lib/riemann/tools/bench.rb
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ def initialize
@hosts = %w[a b c d e f g h i j]
@services = %w[test1 test2 test3 foo bar baz xyzzy attack cat treat]
@states = {}
@client = Riemann::Client.new(host: (ARGV.first || 'localhost'))
@client = Riemann::Client.new(host: ARGV.first || 'localhost')
end

def evolve(state)
Expand Down
2 changes: 1 addition & 1 deletion lib/riemann/tools/net.rb
Original file line number Diff line number Diff line change
Expand Up @@ -108,7 +108,7 @@ def tick

if @old_state
# Report services from `@old_state` that don't exist in `state` as expired
@old_state.reject { |k| state.key?(k) }.each do |service, _metric|
@old_state.reject { |k| state.key?(k) }.each_key do |service|
report(service: service.dup, state: 'expired')
end

Expand Down

0 comments on commit 9d99f9e

Please sign in to comment.