mirror of
https://github.com/elastic/logstash.git
synced 2025-04-25 07:07:54 -04:00
wait for pipeline thread to end before returning from the stop action
This commit is contained in:
parent
f722d23e80
commit
825da10cbb
1 changed files with 1 additions and 0 deletions
|
@ -14,6 +14,7 @@ module LogStash module PipelineAction
|
||||||
def execute(agent, pipelines)
|
def execute(agent, pipelines)
|
||||||
pipeline = pipelines[pipeline_id]
|
pipeline = pipelines[pipeline_id]
|
||||||
pipeline.shutdown { LogStash::ShutdownWatcher.start(pipeline) }
|
pipeline.shutdown { LogStash::ShutdownWatcher.start(pipeline) }
|
||||||
|
pipeline.thread.join
|
||||||
pipelines.delete(pipeline_id)
|
pipelines.delete(pipeline_id)
|
||||||
# If we reach this part of the code we have succeeded because
|
# If we reach this part of the code we have succeeded because
|
||||||
# the shutdown call will block.
|
# the shutdown call will block.
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue