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.
165 166 167 168 169 |
# File 'lib/fluent/plugin/in_zabbix_agent.rb', line 165 def initialize(interval, repeat, log, &callback) @callback = callback @log = log super(interval, repeat) end |
Instance Method Details
#on_timer ⇒ Object
171 172 173 174 175 176 |
# File 'lib/fluent/plugin/in_zabbix_agent.rb', line 171 def on_timer @callback.call rescue => e @log.error(e.) @log.error_backtrace(e.backtrace) end |