Skip to content

Commit

Permalink
Merge pull request #2321 from fluent/add-worker-id-to-process-name
Browse files Browse the repository at this point in the history
system: Add worker_id to process_name when workers is larger than 1
  • Loading branch information
repeatedly authored Mar 12, 2019
2 parents da3affc + 4bf14fd commit eae8611
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion lib/fluent/supervisor.rb
Original file line number Diff line number Diff line change
Expand Up @@ -716,7 +716,13 @@ def logging_with_console_output
end

def main_process(&block)
Process.setproctitle("worker:#{@process_name}") if @process_name
if @process_name
if @workers > 1
Process.setproctitle("worker:#{@process_name}#{ENV['SERVERENGINE_WORKER_ID']}")
else
Process.setproctitle("worker:#{@process_name}")
end
end

unrecoverable_error = false

Expand Down

0 comments on commit eae8611

Please sign in to comment.