[Groonga-commit] droonga/droonga-engine at 32abafc [master] Reject error case near the actual compution

Back to archive index

YUKI Hiroshi null+****@clear*****
Tue Apr 14 12:50:31 JST 2015


YUKI Hiroshi	2015-04-14 12:50:31 +0900 (Tue, 14 Apr 2015)

  New Revision: 32abafc46a92136a6c3406b290396930cb56dadb
  https://github.com/droonga/droonga-engine/commit/32abafc46a92136a6c3406b290396930cb56dadb

  Message:
    Reject error case near the actual compution

  Modified files:
    lib/droonga/plugins/system/absorb_data.rb

  Modified: lib/droonga/plugins/system/absorb_data.rb (+4 -2)
===================================================================
--- lib/droonga/plugins/system/absorb_data.rb    2015-04-14 12:49:31 +0900 (ecc2922)
+++ lib/droonga/plugins/system/absorb_data.rb    2015-04-14 12:50:31 +0900 (f9b2e7d)
@@ -73,8 +73,7 @@ module Droonga
                                    "type" => message["type"])
                 @n_processed_messages += 1
                 elapsed_seconds = (Time.now - @start_time).to_i
-                if (elapsed_seconds % progress_interval_seconds).zero? and
-                     not @total_n_source_records.nil?
+                if (elapsed_seconds % progress_interval_seconds).zero?
                   report_progress
                 end
               end
@@ -111,6 +110,9 @@ module Droonga
           end
 
           def report_progress
+            if @n_processed_messages.nil? or @total_n_source_records.nil?
+              return
+            end
             forward("#{prefix}.progress",
                     "nProcessedMessages" => @n_processed_messages,
                     "percentage"         => progress_percentage,
-------------- next part --------------
HTML����������������������������...
Download 



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