Class: Fluent::OsqueryInput::TimerWatcher

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

Instance Method Summary collapse

Constructor Details

#initialize(interval, repeat, log, &callback) ⇒ TimerWatcher

Returns a new instance of TimerWatcher.



56
57
58
59
60
# File 'lib/fluent/plugin/in_osquery.rb', line 56

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

Instance Method Details

#on_timerObject



62
63
64
65
66
67
# File 'lib/fluent/plugin/in_osquery.rb', line 62

def on_timer
  @callback.call
rescue => e
  @log.error e.to_s
  @log.error_backtrace
end