[Groonga-commit] droonga/droonga-engine at 2faaf87 [master] Export last processed timestamp for the first case correctly

Back to archive index

YUKI Hiroshi null+****@clear*****
Thu Apr 23 16:05:25 JST 2015


YUKI Hiroshi	2015-04-23 16:05:25 +0900 (Thu, 23 Apr 2015)

  New Revision: 2faaf8731de1e76a02e937bd3967f08195095645
  https://github.com/droonga/droonga-engine/commit/2faaf8731de1e76a02e937bd3967f08195095645

  Message:
    Export last processed timestamp for the first case correctly

  Modified files:
    lib/droonga/engine.rb

  Modified: lib/droonga/engine.rb (+3 -2)
===================================================================
--- lib/droonga/engine.rb    2015-04-23 15:52:43 +0900 (41ce66d)
+++ lib/droonga/engine.rb    2015-04-23 16:05:25 +0900 (7be48e0)
@@ -147,10 +147,11 @@ module Droonga
       logger.trace("export_last_processed_message_timestamp: start")
       if @last_processed_message_timestamp
         timestamp = @last_processed_message_timestamp
-        timestamp = timestamp.utc.iso8601(MICRO_SECONDS_DECIMAL_PLACE)
         serf = Serf.new(@name)
         old_timestamp = serf.last_processed_message_timestamp
-        if timestamp > old_timestamp
+        old_timestamp = Time.parse(old_timestamp) if old_timestamp
+        if old_timestamp.nil? or timestamp > old_timestamp
+          timestamp = timestamp.utc.iso8601(MICRO_SECONDS_DECIMAL_PLACE)
           serf.last_processed_message_timestamp = timestamp
           logger.info("exported last processed message timestamp",
                       :timestamp => timestamp)
-------------- next part --------------
HTML����������������������������...
Download 



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