Class: Fluent::DockerMetricsInput::TimerWatcher
- Inherits:
-
Coolio::TimerWatcher
- Object
- Coolio::TimerWatcher
- Fluent::DockerMetricsInput::TimerWatcher
- Defined in:
- lib/fluent/plugin/in_docker_metrics.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.
95 96 97 98 99 |
# File 'lib/fluent/plugin/in_docker_metrics.rb', line 95 def initialize(interval, repeat, log, &callback) @callback = callback @log = log super(interval, repeat) end |
Instance Method Details
#on_timer ⇒ Object
100 101 102 103 104 105 |
# File 'lib/fluent/plugin/in_docker_metrics.rb', line 100 def on_timer @callback.call rescue @log.error $!.to_s @log.error_backtrace end |