Navigation Menu

Skip to content

Commit

Permalink
Report progress only when total count is available
Browse files Browse the repository at this point in the history
  • Loading branch information
piroor committed Apr 14, 2015
1 parent ea38c60 commit a4c3022
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion lib/droonga/plugins/system/absorb_data.rb
Expand Up @@ -71,10 +71,12 @@ def handle
"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
Expand Down

0 comments on commit a4c3022

Please sign in to comment.