Class: Fluent::DfInputTimerWatcher

Inherits:
Coolio::TimerWatcher
  • Object
show all
Defined in:
lib/fluent/plugin/in_df.rb

Instance Method Summary collapse

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_timerObject



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