lib/riemann/tools.rb in riemann-tools-0.2.1 vs lib/riemann/tools.rb in riemann-tools-0.2.2

- old
+ new

@@ -1,11 +1,9 @@ module Riemann module Tools - require 'rubygems' require 'trollop' require 'riemann/client' - require 'timeout' def self.included(base) base.instance_eval do def run new.run @@ -66,22 +64,17 @@ event[:host] = options[:event_host].dup end event = event.merge(attributes) - begin - Timeout::timeout(options[:timeout]) do - riemann << event - end - rescue Timeout::Error - riemann.connect - end + riemann << event end def new_riemann_client r = Riemann::Client.new( - :host => options[:host], - :port => options[:port] + :host => options[:host], + :port => options[:port], + :timeout => options[:timeout] ) if options[:tcp] r.tcp else r