Class: Fluent::EngineClass
- Inherits:
-
Object
- Object
- Fluent::EngineClass
- Defined in:
- lib/flydata/fluent-plugins/in_mysql_binlog_flydata.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
22 23 24 25 26 27 28 29 30 31 32 33 34 35 |
# File 'lib/flydata/fluent-plugins/in_mysql_binlog_flydata.rb', line 22 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 |