Flush until it succeeds

This commit is contained in:
Jordan Sissel 2012-09-02 18:14:29 -07:00
parent ddecf89a28
commit a5bfa5526b

View file

@ -101,7 +101,9 @@ class LogStash::Outputs::ElasticSearchHTTP < LogStash::Outputs::Base
event.to_json event.to_json
].join("\n") ].join("\n")
flush if @queue.size >= @flush_size # Keep trying to flush while the queue is full.
# This will cause retries in flushing if the flush fails.
flush while @queue.size >= @flush_size
end # def receive_bulk end # def receive_bulk
def flush def flush