Class: Fluent::StatsitePlugin::StatsiteAggregateParser::TimerWatcher
- Inherits:
-
Coolio::TimerWatcher
- Object
- Coolio::TimerWatcher
- Fluent::StatsitePlugin::StatsiteAggregateParser::TimerWatcher
- Defined in:
- lib/fluent/plugin/statsite/parser.rb
Instance Method Summary collapse
-
#initialize(duration, log, callback) ⇒ TimerWatcher
constructor
A new instance of TimerWatcher.
- #on_timer ⇒ Object
Constructor Details
#initialize(duration, log, callback) ⇒ TimerWatcher
Returns a new instance of TimerWatcher.
76 77 78 79 80 |
# File 'lib/fluent/plugin/statsite/parser.rb', line 76 def initialize(duration, log, callback) @callback = callback @log = log super(interval, repeat) end |
Instance Method Details
#on_timer ⇒ Object
82 83 84 85 86 87 |
# File 'lib/fluent/plugin/statsite/parser.rb', line 82 def on_timer @callback.call rescue @log.error $!.to_s @log.error_backtrace end |