mirror of
https://github.com/elastic/logstash.git
synced 2025-04-24 06:37:19 -04:00
properly set thread name in thread context
This commit is contained in:
parent
186a588e57
commit
5591ee7d79
2 changed files with 2 additions and 2 deletions
|
@ -217,11 +217,11 @@ module LogStash; class JavaPipeline < JavaBasePipeline
|
|||
|
||||
pipeline_workers.times do |t|
|
||||
thread = Thread.new do
|
||||
Util.set_thread_name("[#{pipeline_id}]>worker#{t}")
|
||||
org.logstash.execution.WorkerLoop.new(
|
||||
lir_execution, filter_queue_client, @events_filtered, @events_consumed,
|
||||
@flushRequested, @flushing, @shutdownRequested, @drain_queue).run
|
||||
end
|
||||
Util.set_thread_name("[#{pipeline_id}]>worker#{t}")
|
||||
@worker_threads << thread
|
||||
end
|
||||
|
||||
|
|
|
@ -283,9 +283,9 @@ module LogStash; class Pipeline < BasePipeline
|
|||
|
||||
pipeline_workers.times do |t|
|
||||
thread = Thread.new(batch_size, batch_delay, self) do |_b_size, _b_delay, _pipeline|
|
||||
Util.set_thread_name("[#{pipeline_id}]>worker#{t}")
|
||||
_pipeline.worker_loop(_b_size, _b_delay)
|
||||
end
|
||||
Util.set_thread_name("[#{pipeline_id}]>worker#{t}")
|
||||
@worker_threads << thread
|
||||
end
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue