Class: Fluent::Rds_GenlogInput::TimerWatcher

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

Instance Method Summary collapse

Constructor Details

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

Returns a new instance of TimerWatcher.



99
100
101
102
103
# File 'lib/fluent/plugin/in_rds_genlog.rb', line 99

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

Instance Method Details

#on_timerObject



105
106
107
108
109
110
# File 'lib/fluent/plugin/in_rds_genlog.rb', line 105

def on_timer
  @callback.call
rescue => e
  @log.error(e.message)
  @log.error_backtrace(e.backtrace)
end