YUKI Hiroshi
null+****@clear*****
Tue Jan 6 19:28:44 JST 2015
YUKI Hiroshi 2015-01-06 19:28:44 +0900 (Tue, 06 Jan 2015) New Revision: 66241e301fefda5b4bf10738200561aa3d025086 https://github.com/droonga/droonga-engine/commit/66241e301fefda5b4bf10738200561aa3d025086 Message: Remoev obsolete codes to confrol buffering by forwarder Conflicts: lib/droonga/forwarder.rb Modified files: lib/droonga/forwarder.rb Modified: lib/droonga/forwarder.rb (+1 -37) =================================================================== --- lib/droonga/forwarder.rb 2015-01-06 19:25:15 +0900 (52e938b) +++ lib/droonga/forwarder.rb 2015-01-06 19:28:44 +0900 (569cdd4) @@ -17,8 +17,6 @@ require "droonga/loggable" require "droonga/path" -require "droonga/event_loop" -require "droonga/buffered_tcp_socket" require "droonga/fluent_message_sender" module Droonga @@ -27,13 +25,11 @@ module Droonga def initialize(loop, options={}) @loop = loop - @buffering = options[:buffering] @senders = {} end def start logger.trace("start: start") - resume logger.trace("start: done") end @@ -54,35 +50,6 @@ module Droonga logger.trace("forward: done") end - def resume - return unless Path.accidental_buffer.exist? - Pathname.glob("#{Path.accidental_buffer}/*") do |path| - next unless path.directory? - - destination = path.basename.to_s - sender = @senders[destination] - if sender - sender.resume - next - end - - chunk_loader = BufferedTCPSocket::ChunkLoader.new(path) - unless chunk_loader.have_any_chunk? - #FileUtils.rm_rf(path.to_s) # TODO re-enable this - next - end - - components = destination.split(":") - port = components.pop.to_i - next if port.zero? - host = components.join(":") - - sender = create_sender(host, port) - sender.resume - @senders[destination] = sender - end - end - private def output(receiver, message, command, arguments, options={}) logger.trace("output: start") @@ -139,10 +106,7 @@ module Droonga end def create_sender(host, port) - options = { - :buffering => @buffering, - } - sender = FluentMessageSender.new(@loop, host, port, options) + sender = FluentMessageSender.new(@loop, host, port) sender.start sender end -------------- next part -------------- HTML����������������������������... Download