Class: Fluent::SpectrumInput::TimerWatcher
- Inherits:
-
Coolio::TimerWatcher
- Object
- Coolio::TimerWatcher
- Fluent::SpectrumInput::TimerWatcher
- Defined in:
- lib/fluent/plugin/in_spectrum.rb
Overview
Classes
Instance Method Summary collapse
-
#initialize(interval, repeat, &callback) ⇒ TimerWatcher
constructor
A new instance of TimerWatcher.
-
#on_timer ⇒ Object
def initialize.
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_timer ⇒ Object
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 |