Class: Fluent::DfInputTimerWatcher
- Inherits:
-
Coolio::TimerWatcher
- Object
- Coolio::TimerWatcher
- Fluent::DfInputTimerWatcher
- Defined in:
- lib/fluent/plugin/in_df.rb
Instance Method Summary collapse
-
#initialize(interval, repeat, &callback) ⇒ DfInputTimerWatcher
constructor
A new instance of DfInputTimerWatcher.
- #on_timer ⇒ Object
Constructor Details
#initialize(interval, repeat, &callback) ⇒ DfInputTimerWatcher
Returns a new instance of DfInputTimerWatcher.
83 84 85 86 |
# File 'lib/fluent/plugin/in_df.rb', line 83 def initialize(interval, repeat, &callback) @callback = callback super(interval, repeat) end |
Instance Method Details
#on_timer ⇒ Object
88 89 90 91 92 |
# File 'lib/fluent/plugin/in_df.rb', line 88 def on_timer @callback.call rescue => e $log.error "#{e.class.name} - #{e.message}" end |