Module: Fluent::DetachMultiProcessMixin

Includes:
DetachProcessImpl
Included in:
HttpInput
Defined in:
lib/fluent/process.rb

Instance Method Summary collapse

Methods included from DetachProcessImpl

#on_detach_process, #on_exit_process

Instance Method Details

#configure(conf) ⇒ Object



467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
# File 'lib/fluent/process.rb', line 467

def configure(conf)
  super

  @detach_process = nil

  if detach_process = conf['detach_process']
    b3v = Config.bool_value(detach_process)
    case b3v
    when nil
      num = detach_process.to_i
      if num > 0
        @detach_process = true
        @detach_process_num = num
      elsif detach_process =~ /0+/
        @detach_process = false
      else
        @detach_process = true
      end
    when true
      @detach_process = true
    when false
      @detach_process = false
    end
  end
end

#initializeObject



462
463
464
465
# File 'lib/fluent/process.rb', line 462

def initialize
  @detach_process_num = 2
  super
end