Class: Fluent::RdsMysqlSlowLog::TimerWatcher
- Inherits:
-
Coolio::TimerWatcher
- Object
- Coolio::TimerWatcher
- Fluent::RdsMysqlSlowLog::TimerWatcher
- Defined in:
- lib/fluent/plugin/in_rds_mysql_slow_log.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.
210 211 212 213 214 |
# File 'lib/fluent/plugin/in_rds_mysql_slow_log.rb', line 210 def initialize(interval, repeat, log, &callback) @callback = callback @log = log super(interval, repeat) end |
Instance Method Details
#on_timer ⇒ Object
216 217 218 219 220 221 |
# File 'lib/fluent/plugin/in_rds_mysql_slow_log.rb', line 216 def on_timer @callback.call rescue @log.error $!.to_s @log.error_backtrace end |