Class: Fluent::Plugin::TailInput::TimerTrigger
- Inherits:
-
Coolio::TimerWatcher
- Object
- Coolio::TimerWatcher
- Fluent::Plugin::TailInput::TimerTrigger
- Defined in:
- lib/fluent/plugin/in_tail.rb
Instance Method Summary collapse
-
#initialize(interval, log, &callback) ⇒ TimerTrigger
constructor
A new instance of TimerTrigger.
- #on_timer ⇒ Object
Constructor Details
#initialize(interval, log, &callback) ⇒ TimerTrigger
Returns a new instance of TimerTrigger.
837 838 839 840 841 |
# File 'lib/fluent/plugin/in_tail.rb', line 837 def initialize(interval, log, &callback) @log = log @callback = callback super(interval, true) end |
Instance Method Details
#on_timer ⇒ Object
843 844 845 846 847 848 |
# File 'lib/fluent/plugin/in_tail.rb', line 843 def on_timer @callback.call rescue => e @log.error e.to_s @log.error_backtrace end |