Class: Fluent::ZabbixAgentInput::TimerWatcher
- Inherits:
-
Coolio::TimerWatcher
- Object
- Coolio::TimerWatcher
- Fluent::ZabbixAgentInput::TimerWatcher
- Defined in:
- lib/fluent/plugin/in_zabbix_agent.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.
143 144 145 146 147 |
# File 'lib/fluent/plugin/in_zabbix_agent.rb', line 143 def initialize(interval, repeat, log, &callback) @callback = callback @log = log super(interval, repeat) end |
Instance Method Details
#on_timer ⇒ Object
149 150 151 152 153 154 |
# File 'lib/fluent/plugin/in_zabbix_agent.rb', line 149 def on_timer @callback.call rescue => e @log.error(e.) @log.error_backtrace(e.backtrace) end |