Class: Fluent::FilterAggregate::TimerWatcher
- Inherits:
-
Coolio::TimerWatcher
- Object
- Coolio::TimerWatcher
- Fluent::FilterAggregate::TimerWatcher
- Defined in:
- lib/fluent/plugin/filter_aggregate.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.
170 171 172 173 174 |
# File 'lib/fluent/plugin/filter_aggregate.rb', line 170 def initialize(interval, repeat, log, &callback) @callback = callback @log = log super(interval, repeat) end |
Instance Method Details
#on_timer ⇒ Object
175 176 177 178 179 180 |
# File 'lib/fluent/plugin/filter_aggregate.rb', line 175 def on_timer @callback.call rescue @log.error $!.to_s @log.error_backtrace end |