Class: Fluent::EngineClass
- Inherits:
-
Object
- Object
- Fluent::EngineClass
- Defined in:
- lib/flydata/fluent-plugins/flydata_plugin_ext/flush_support.rb
Overview
Monkey-patch fluentd class (EngineClass) to support shutdown for input plugin. This will be called when USR1 signal is received
Instance Method Summary collapse
-
#shutdown_source ⇒ Object
Send shutdown to all the sources.
Instance Method Details
#shutdown_source ⇒ Object
Send shutdown to all the sources
7 8 9 10 11 12 13 14 15 16 17 18 19 20 |
# File 'lib/flydata/fluent-plugins/flydata_plugin_ext/flush_support.rb', line 7 def shutdown_source @sources.map {|s| Thread.new do begin s.shutdown rescue => e $log.warn "unexpected error while shutting down", :error_class=>e.class, :error=>e $log.warn_backtrace end end }.each {|t| t.join } end |