[Groonga-commit] droonga/droonga-engine at 5a7bad6 [buffered-forward] Get timestamp from file path

Back to archive index

YUKI Hiroshi null+****@clear*****
Thu Dec 18 18:26:43 JST 2014


YUKI Hiroshi	2014-12-18 18:26:43 +0900 (Thu, 18 Dec 2014)

  New Revision: 5a7bad6c5990b8c8aa9db6d0968ae05b895ab14e
  https://github.com/droonga/droonga-engine/commit/5a7bad6c5990b8c8aa9db6d0968ae05b895ab14e

  Message:
    Get timestamp from file path

  Modified files:
    lib/droonga/forward_buffer.rb

  Modified: lib/droonga/forward_buffer.rb (+3 -1)
===================================================================
--- lib/droonga/forward_buffer.rb    2014-12-18 18:18:55 +0900 (d88a24f)
+++ lib/droonga/forward_buffer.rb    2014-12-18 18:26:43 +0900 (1bd4ca7)
@@ -66,7 +66,9 @@ module Droonga
 
     private
     def output(buffered_message_path)
-      file_contents = Pathname(buffered_message_path).read
+      buffered_message_path = Pathname(buffered_message_path)
+      timestamp = buffered_message_path.basename(".#{SUFFIX}")
+      file_contents = buffered_message_path.read
       buffered_message = JSON.parse(file_contents)
       @forwarder.output(buffered_message["receiver"],
                         buffered_message["message"],
-------------- next part --------------
HTML����������������������������...
Download 



More information about the Groonga-commit mailing list
Back to archive index