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



80
81
82
83
# File 'lib/fluent/plugin/in_df.rb', line 80

def initialize(interval, repeat, &callback)
  @callback = callback
  super(interval, repeat)
end

Instance Method Details

#on_timerObject



85
86
87
88
89
# File 'lib/fluent/plugin/in_df.rb', line 85

def on_timer
  @callback.call
rescue => e
  $log.error "#{e.class.name} - #{e.message}"
end