Module: Fluent::WorkerModule
- Defined in:
- lib/fluent/supervisor.rb
Instance Method Summary collapse
Instance Method Details
#after_start ⇒ Object
559 560 561 |
# File 'lib/fluent/supervisor.rb', line 559 def after_start (config[:worker_pid] ||= {})[@worker_id] = @pm.pid end |
#dump ⇒ Object
563 564 565 |
# File 'lib/fluent/supervisor.rb', line 563 def dump super unless @stop end |
#spawn(process_manager) ⇒ Object
550 551 552 553 554 555 556 557 |
# File 'lib/fluent/supervisor.rb', line 550 def spawn(process_manager) main_cmd = config[:main_cmd] env = { 'SERVERENGINE_WORKER_ID' => @worker_id.to_i.to_s, 'FLUENT_INSTANCE_ID' => Fluent::INSTANCE_ID, } @pm = process_manager.spawn(env, *main_cmd) end |