Class: Fluent::StatsitePlugin::StatsiteAggregateParser::TimerWatcher

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

Instance Method Summary collapse

Constructor Details

#initialize(duration, log, callback) ⇒ TimerWatcher

Returns a new instance of TimerWatcher.



76
77
78
79
80
# File 'lib/fluent/plugin/statsite/parser.rb', line 76

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

Instance Method Details

#on_timerObject



82
83
84
85
86
87
# File 'lib/fluent/plugin/statsite/parser.rb', line 82

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