Class: Fluent::TailPathInput::TailWatcher::TimerWatcher
- Inherits:
-
Coolio::TimerWatcher
- Object
- Coolio::TimerWatcher
- Fluent::TailPathInput::TailWatcher::TimerWatcher
- Defined in:
- lib/fluent/plugin/in_tailpath.rb
Instance Method Summary collapse
-
#initialize(interval, repeat, &callback) ⇒ TimerWatcher
constructor
A new instance of TimerWatcher.
- #on_timer ⇒ Object
Constructor Details
#initialize(interval, repeat, &callback) ⇒ TimerWatcher
Returns a new instance of TimerWatcher.
241 242 243 244 |
# File 'lib/fluent/plugin/in_tailpath.rb', line 241 def initialize(interval, repeat, &callback) @callback = callback super(interval, repeat) end |
Instance Method Details
#on_timer ⇒ Object
246 247 248 249 250 251 252 |
# File 'lib/fluent/plugin/in_tailpath.rb', line 246 def on_timer @callback.call rescue # TODO log? $log.error $!.to_s $log.error_backtrace end |