mirror of
https://github.com/elastic/logstash.git
synced 2025-04-23 22:27:21 -04:00
parent
97f5537828
commit
a9218daa65
2 changed files with 1 additions and 16 deletions
|
@ -190,13 +190,6 @@ class LogStash::Agent
|
|||
converge_result
|
||||
end
|
||||
|
||||
def force_shutdown!
|
||||
stop_collecting_metrics
|
||||
stop_webserver
|
||||
transition_to_stopped
|
||||
force_shutdown_pipelines!
|
||||
end
|
||||
|
||||
def id
|
||||
return @id if @id
|
||||
|
||||
|
@ -427,13 +420,6 @@ class LogStash::Agent
|
|||
@collect_metric
|
||||
end
|
||||
|
||||
def force_shutdown_pipelines!
|
||||
@pipelines.each do |_, pipeline|
|
||||
# TODO(ph): should it be his own action?
|
||||
pipeline.force_shutdown!
|
||||
end
|
||||
end
|
||||
|
||||
def shutdown_pipelines
|
||||
logger.debug("Shutting down all pipelines", :pipelines_count => pipelines_count)
|
||||
|
||||
|
|
|
@ -468,8 +468,7 @@ class LogStash::Runner < Clamp::StrictCommand
|
|||
Stud::trap("INT") do
|
||||
if @interrupted_once
|
||||
logger.fatal(I18n.t("logstash.agent.forced_sigint"))
|
||||
@agent.force_shutdown!
|
||||
exit
|
||||
exit(1)
|
||||
else
|
||||
logger.warn(I18n.t("logstash.agent.sigint"))
|
||||
Thread.new(logger) {|lg| sleep 5; lg.warn(I18n.t("logstash.agent.slow_shutdown")) }
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue