Class: Fluent::SpectrumInput::TimerWatcher

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

Overview

Classes

Instance Method Summary collapse

Constructor Details

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

Returns a new instance of TimerWatcher.



26
27
28
29
# File 'lib/fluent/plugin/in_spectrum.rb', line 26

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

Instance Method Details

#on_timerObject

def initialize



31
32
33
34
35
36
# File 'lib/fluent/plugin/in_spectrum.rb', line 31

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