Class: Fluent::CephInput::TimerWatcher

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

Instance Method Summary collapse

Constructor Details

#initialize(interval, repeat, &method) ⇒ TimerWatcher

Returns a new instance of TimerWatcher.



88
89
90
91
# File 'lib/fluent/plugin/in_ceph.rb', line 88

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

Instance Method Details

#on_timerObject



93
94
95
96
97
98
# File 'lib/fluent/plugin/in_ceph.rb', line 93

def on_timer
  @emit_message.call
rescue
  $log.error $!.to_s
  $log.error_backtrace
end