Navigation Menu

Skip to content

Commit

Permalink
Calculate percentage correctly
Browse files Browse the repository at this point in the history
  • Loading branch information
piroor committed Apr 21, 2015
1 parent 50419d8 commit 2d279a3
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/droonga/plugins/system/absorb_data.rb
Expand Up @@ -310,7 +310,7 @@ def progress_percentage
return 0 if @dumper.n_forecasted_messages.zero?
processed = @dumper.n_received_messages + @n_restored_objects
expected = @dumper.n_forecasted_messages * 2
progress = processed / expected
progress = processed.to_f / expected
[(progress * 100).to_i, 100].min
end

Expand Down

0 comments on commit 2d279a3

Please sign in to comment.