mirror of
https://github.com/elastic/logstash.git
synced 2025-04-24 22:57:16 -04:00
- remove unused code and some typo fixes
This commit is contained in:
parent
480e78ba0a
commit
6f6d935a83
1 changed files with 1 additions and 31 deletions
|
@ -361,7 +361,6 @@ class LogStash::Agent
|
||||||
end # N.times
|
end # N.times
|
||||||
end # if @filters.length > 0
|
end # if @filters.length > 0
|
||||||
|
|
||||||
|
|
||||||
# Create output threads
|
# Create output threads
|
||||||
@outputs.each do |output|
|
@outputs.each do |output|
|
||||||
queue = SizedQueue.new(10)
|
queue = SizedQueue.new(10)
|
||||||
|
@ -392,35 +391,6 @@ class LogStash::Agent
|
||||||
# then stop the event loop
|
# then stop the event loop
|
||||||
end # def stop
|
end # def stop
|
||||||
|
|
||||||
# TODO(sissel): Is this method even used anymore?
|
|
||||||
protected
|
|
||||||
def filter(event)
|
|
||||||
@filters.each do |f|
|
|
||||||
f.filter(event)
|
|
||||||
break if event.cancelled?
|
|
||||||
end
|
|
||||||
end # def filter
|
|
||||||
|
|
||||||
# TODO(sissel): Is this method even used anymore?
|
|
||||||
protected
|
|
||||||
def output(event)
|
|
||||||
# TODO(sissel): write to a multiqueue and do 1 thread per output?
|
|
||||||
@outputs.each do |o|
|
|
||||||
o.handle(event)
|
|
||||||
end # each output
|
|
||||||
end # def output
|
|
||||||
|
|
||||||
# TODO(sissel): Is this method even used anymore?
|
|
||||||
protected
|
|
||||||
# Process a message
|
|
||||||
def receive(event)
|
|
||||||
filter(event)
|
|
||||||
|
|
||||||
if !event.cancelled?
|
|
||||||
output(event)
|
|
||||||
end
|
|
||||||
end # def input
|
|
||||||
|
|
||||||
# Shutdown the agent.
|
# Shutdown the agent.
|
||||||
protected
|
protected
|
||||||
def shutdown
|
def shutdown
|
||||||
|
@ -523,7 +493,7 @@ class LogStash::Agent
|
||||||
e.backtrace])
|
e.backtrace])
|
||||||
@logger.error("Restarting input #{input.to_s} due to exception")
|
@logger.error("Restarting input #{input.to_s} due to exception")
|
||||||
sleep(1)
|
sleep(1)
|
||||||
retry # This jumps to the top of this proc (to the start of 'do'
|
retry # This jumps to the top of this proc (to the start of 'do')
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue