Method: Fluent::PluginHelper::Timer::TimerWatcher#on_timer

Defined in:
lib/fluent/plugin_helper/timer.rb

#on_timerObject



79
80
81
82
83
84
85
86
87
88
# File 'lib/fluent/plugin_helper/timer.rb', line 79

def on_timer
  @callback.call if @checker.call
rescue => e
  @log.error "Unexpected error raised. Stopping the timer.", title: @title, error: e
  @log.error_backtrace
  detach
  @log.error "Timer detached.", title: @title
ensure
  @detacher.call(self) unless @repeat
end