Method: Computation#next_message
- Defined in:
- lib/signalfx/signalflow/computation.rb
#next_message(timeout_seconds = nil) ⇒ Object
Get the next message in this computation.
60 61 62 63 64 65 66 67 68 69 |
# File 'lib/signalfx/signalflow/computation.rb', line 60 def (timeout_seconds=nil) raise "Computation #{@handle} is not attached to a channel" unless @channel msg = nil while msg.nil? && !@channel.nil? # process_message might return no messages if it is building up a batch msg = (@channel.pop(timeout_seconds)) end return msg end |