lib/fozzie/classes.rb in fozzie-0.0.4 vs lib/fozzie/classes.rb in fozzie-0.0.5
- old
+ new
@@ -11,17 +11,11 @@
super host, port
end
def time_to_do(stat, sample_rate=1, &block); time_for(stat, sample_rate, &block); end
def time_for(stat, sample_rate=1, &block)
- res = nil
- begin
- res = time(stat, sample_rate, &block)
- rescue SocketError => exc
- puts exc.message
- res
- end
+ time(stat, sample_rate, &block)
end
def committed; commit; end
def commit
event :commit
@@ -39,9 +33,17 @@
private
def event(type)
timing "event.#{type.to_s}", Time.now.usec
+ end
+
+ def send_to_socket(message)
+ begin
+ super(message)
+ rescue SocketError => exc
+ nil
+ end
end
end
NAMESPACES = %w{Stats S Statistics Warehouse}
\ No newline at end of file