Add info messages for release 1.0.0 tasks

So users know what's going on when they upgrade CONSUL.
This commit is contained in:
Javi Martín
2019-06-03 16:59:40 +02:00
parent 3ab2085e05
commit 1d0b05832c
6 changed files with 22 additions and 1 deletions

View File

@@ -1,8 +1,11 @@
namespace :budgets do
desc "Regenerate ballot_lines_count cache"
task calculate_ballot_lines: :environment do
Budget::Ballot.find_each do |ballot|
ApplicationLogger.new.info "Calculating ballot lines"
Budget::Ballot.find_each.with_index do |ballot, index|
Budget::Ballot.reset_counters ballot.id, :lines
print "." if (index % 10_000).zero?
end
end