Method: EventSource::Iterator#get_batch
- Defined in:
- lib/event_source/iterator.rb
#get_batch ⇒ Object
77 78 79 80 81 82 83 84 85 86 87 88 89 90 |
# File 'lib/event_source/iterator.rb', line 77 def get_batch position = next_batch_starting_position logger.trace "Getting batch (Position: #{position.inspect})" batch = [] if position.nil? || position >= 0 batch = get.(stream_name, position: position) end logger.debug { "Finished getting batch (Count: #{batch.length}, Position: #{position.inspect})" } batch end |