Class: Fluent::StatusInput::TimerWatcher
- Inherits:
-
Coolio::TimerWatcher
- Object
- Coolio::TimerWatcher
- Fluent::StatusInput::TimerWatcher
- Defined in:
- lib/fluent/plugin/in_status.rb
Instance Method Summary collapse
-
#initialize(interval, repeat, log, &callback) ⇒ TimerWatcher
constructor
A new instance of TimerWatcher.
- #on_timer ⇒ Object
Constructor Details
#initialize(interval, repeat, log, &callback) ⇒ TimerWatcher
Returns a new instance of TimerWatcher.
29 30 31 32 33 |
# File 'lib/fluent/plugin/in_status.rb', line 29 def initialize(interval, repeat, log, &callback) @callback = callback @log = log super(interval, repeat) end |
Instance Method Details
#on_timer ⇒ Object
35 36 37 38 39 40 41 |
# File 'lib/fluent/plugin/in_status.rb', line 35 def on_timer @callback.call rescue # TODO log? @log.error $!.to_s @log.error_backtrace end |