YUKI Hiroshi
null+****@clear*****
Wed Apr 22 10:28:25 JST 2015
YUKI Hiroshi 2015-04-22 10:28:25 +0900 (Wed, 22 Apr 2015) New Revision: f3a3347023b06b483a0236c18dece85cef3d81e2 https://github.com/droonga/droonga-engine/commit/f3a3347023b06b483a0236c18dece85cef3d81e2 Message: Separate definition of enumerator for buffered messages Modified files: lib/droonga/forward_buffer.rb Modified: lib/droonga/forward_buffer.rb (+5 -1) =================================================================== --- lib/droonga/forward_buffer.rb 2015-04-22 10:27:21 +0900 (fd75d3a) +++ lib/droonga/forward_buffer.rb 2015-04-22 10:28:25 +0900 (aeb50c3) @@ -65,7 +65,7 @@ module Droonga def start_forward logger.trace("start_forward: start") n_forwarded_messages = 0 - Pathname.glob("#{@data_directory}/*#{SUFFIX}").collect do |buffered_message_path| + buffered_messages.collect do |buffered_message_path| forwarded = forward(buffered_message_path) n_forwarded_messages += 1 if forwarded end @@ -79,6 +79,10 @@ module Droonga logger.trace("start_forward: done") end + def buffered_messages + Pathname.glob("#{@data_directory}/*#{SUFFIX}") + end + def empty? @data_directory.children.empty? end -------------- next part -------------- HTML����������������������������... ダウンロード