Class: Fluent::DelayedEvent

Inherits:
Coolio::TimerWatcher
  • Object
show all
Defined in:
lib/fluent/plugin/out_delayed.rb

Instance Method Summary collapse

Constructor Details

#initialize(tag, event, chain, output, delay) ⇒ DelayedEvent

Returns a new instance of DelayedEvent.



21
22
23
24
25
26
27
# File 'lib/fluent/plugin/out_delayed.rb', line 21

def initialize(tag, event, chain,output, delay)
  super(delay, false)
  @tag = tag
  @event = event
  @output = output
  @chain = chain
end

Instance Method Details

#on_timerObject



29
30
31
32
# File 'lib/fluent/plugin/out_delayed.rb', line 29

def on_timer
  @output.emit(@tag, @event, @chain)
  detach
end