Class: Fluent::DstatInput::TimerWatcher

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

Instance Method Summary collapse

Constructor Details

#initialize(interval, repeat, &check_dstat) ⇒ TimerWatcher

Returns a new instance of TimerWatcher.



174
175
176
177
# File 'lib/fluent/plugin/in_dstat.rb', line 174

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

Instance Method Details

#on_timerObject



179
180
181
182
183
184
# File 'lib/fluent/plugin/in_dstat.rb', line 179

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