Class: Fluent::StormInput::TimerWatcher
- Inherits:
-
Coolio::TimerWatcher
- Object
- Coolio::TimerWatcher
- Fluent::StormInput::TimerWatcher
- Defined in:
- lib/fluent/plugin/in_storm.rb
Instance Method Summary collapse
-
#initialize(interval, repeat, log, &callback) ⇒ TimerWatcher
constructor
A new instance of TimerWatcher.
- #on_timer ⇒ Object
Constructor Details
#initialize(interval, repeat, log, &callback) ⇒ TimerWatcher
Returns a new instance of TimerWatcher.
90 91 92 93 94 |
# File 'lib/fluent/plugin/in_storm.rb', line 90 def initialize(interval, repeat, log, &callback) @log = log @callback = callback super(interval, repeat) end |
Instance Method Details
#on_timer ⇒ Object
96 97 98 99 100 101 |
# File 'lib/fluent/plugin/in_storm.rb', line 96 def on_timer @callback.call rescue => e @log.error e.to_s @log.error_backtrace end |