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.



20
21
22
23
# File 'lib/fluent/plugin/in_spectrum.rb', line 20

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

Instance Method Details

#on_timerObject

def initialize



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

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