Class: Fluent::IRCOutput::TimerWatcher

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

Instance Method Summary collapse

Constructor Details

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

Returns a new instance of TimerWatcher.



197
198
199
200
201
# File 'lib/fluent/plugin/out_irc.rb', line 197

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

Instance Method Details

#on_timerObject



203
204
205
206
207
208
# File 'lib/fluent/plugin/out_irc.rb', line 203

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