Method: Fluent::Plugin::Buffer#update_timekeys

Defined in:
lib/fluent/plugin/buffer.rb

#update_timekeysObject



521
522
523
524
525
526
527
528
529
530
531
532
# File 'lib/fluent/plugin/buffer.rb', line 521

def update_timekeys
  synchronize do
    chunks = @stage.values
    chunks.concat(@queue)
    @timekeys = chunks.each_with_object({}) do |chunk, keys|
      if chunk. && chunk..timekey
        t = chunk..timekey
        keys[t] = keys.fetch(t, 0) + 1
      end
    end
  end
end