Module: Fluent::WorkerModule

Defined in:
lib/fluent/supervisor.rb

Instance Method Summary collapse

Instance Method Details

#after_startObject



200
201
202
# File 'lib/fluent/supervisor.rb', line 200

def after_start
  config[:worker_pid] = @pm.pid
end

#spawn(process_manager) ⇒ Object



192
193
194
195
196
197
198
# File 'lib/fluent/supervisor.rb', line 192

def spawn(process_manager)
  main_cmd = config[:main_cmd]
  env = {
    'SERVERENGINE_WORKER_ID' => @worker_id.to_i.to_s,
  }
  @pm = process_manager.spawn(env, *main_cmd)
end