lib/fnordmetric/inbound_stream.rb in fnordmetric-0.5.9 vs lib/fnordmetric/inbound_stream.rb in fnordmetric-0.6.0

- old
+ new

@@ -1,5 +1,6 @@ +require 'securerandom' class FnordMetric::InboundStream < EventMachine::Connection @@opts = nil def self.start(opts) @@ -41,10 +42,10 @@ push_event(get_next_uuid, @events.pop) EM.next_tick(&method(:push_next_event)) end def get_next_uuid - rand(9999999999999999999).to_s # FIXME + SecureRandom.uuid end def close_connection? @redis.quit unless @streaming || (@events_buffered!=0) end