Class: Fluent::ObjectSpaceInput::TimerWatcher
- Inherits:
-
Coolio::TimerWatcher
- Object
- Coolio::TimerWatcher
- Fluent::ObjectSpaceInput::TimerWatcher
- Defined in:
- lib/fluent/plugin/in_object_space.rb
Instance Method Summary collapse
-
#initialize(interval, repeat, &callback) ⇒ TimerWatcher
constructor
A new instance of TimerWatcher.
- #on_timer ⇒ Object
Constructor Details
#initialize(interval, repeat, &callback) ⇒ TimerWatcher
Returns a new instance of TimerWatcher.
33 34 35 36 |
# File 'lib/fluent/plugin/in_object_space.rb', line 33 def initialize(interval, repeat, &callback) @callback = callback super(interval, repeat) end |
Instance Method Details
#on_timer ⇒ Object
38 39 40 41 42 43 44 |
# File 'lib/fluent/plugin/in_object_space.rb', line 38 def on_timer @callback.call rescue # TODO log? $log.error $!.to_s $log.error_backtrace end |