Class: Fluent::DstatInput::TimerWatcher
- Inherits:
-
Cool.io::TimerWatcher
- Object
- Cool.io::TimerWatcher
- Fluent::DstatInput::TimerWatcher
- Defined in:
- lib/fluent/plugin/in_dstat.rb
Instance Method Summary collapse
-
#initialize(interval, repeat, &check_dstat) ⇒ TimerWatcher
constructor
A new instance of TimerWatcher.
- #on_timer ⇒ Object
Constructor Details
#initialize(interval, repeat, &check_dstat) ⇒ TimerWatcher
Returns a new instance of TimerWatcher.
180 181 182 183 |
# File 'lib/fluent/plugin/in_dstat.rb', line 180 def initialize(interval, repeat, &check_dstat) @check_dstat = check_dstat super(interval, repeat) end |
Instance Method Details
#on_timer ⇒ Object
185 186 187 188 189 190 |
# File 'lib/fluent/plugin/in_dstat.rb', line 185 def on_timer @check_dstat.call rescue $log.error $!.to_s $log.error_backtrace end |