[Groonga-commit] droonga/droonga-engine at a4c3022 [master] Report progress only when total count is available

Back to archive index

YUKI Hiroshi null+****@clear*****
Tue Apr 14 12:21:41 JST 2015


YUKI Hiroshi	2015-04-14 12:21:41 +0900 (Tue, 14 Apr 2015)

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

  Message:
    Report progress only when total count is available

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

  Modified: lib/droonga/plugins/system/absorb_data.rb (+3 -1)
===================================================================
--- lib/droonga/plugins/system/absorb_data.rb    2015-04-14 12:19:50 +0900 (2c6b34c)
+++ lib/droonga/plugins/system/absorb_data.rb    2015-04-14 12:21:41 +0900 (2c805dc)
@@ -71,10 +71,12 @@ module Droonga
                                    "to"   => my_node_name,
                                    "type" => message["type"])
                 elapsed_seconds = (Time.now - @start_time).to_i
-                if (elapsed_seconds % progress_interval_seconds).zero?
+                if (elapsed_seconds % progress_interval_seconds).zero? and
+                     not @total_n_source_records.nil?
                   report_progress
                 end
               end
+              @total_n_source_records = @n_processed_messages
               report_progress
             rescue Exception => exception
               dumper_error_message = exception.to_s
-------------- next part --------------
HTML����������������������������...
Download 



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