Class: Fluent::FilterAggregate::TimerWatcher

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

Instance Method Summary collapse

Constructor Details

#initialize(interval, repeat, log, &callback) ⇒ TimerWatcher

Returns a new instance of TimerWatcher.



190
191
192
193
194
# File 'lib/fluent/plugin/filter_aggregate.rb', line 190

def initialize(interval, repeat, log, &callback)
  @callback = callback
  @log = log
  super(interval, repeat)
end

Instance Method Details

#on_timerObject



195
196
197
198
199
200
# File 'lib/fluent/plugin/filter_aggregate.rb', line 195

def on_timer
  @callback.call
rescue
  @log.error $!.to_s
  @log.error_backtrace
end