Remove unused task to reset the vote counters

This task was added in commit 2b9b78e38. According to the notes in the
pull request introducing the change:

> If you have had [map validations] in production, you might want to run
> the rake task votes:reset_vote_counter to reset the cached votes
> counter. Otherwise, until there is another vote for a proposal, the
> counter will not be updated, and there might be some votes which are
> not yet displayed

In short, this was a task that was introduced for a specific release and
had to be run manually. So we can remove it now.
This commit is contained in:
Javi Martín
2022-09-28 12:51:00 +02:00
parent e221c3cd1a
commit f15f250150

View File

@@ -1,16 +1,4 @@
namespace :votes do namespace :votes do
desc "Resets cached_votes_up counter to its latest value"
task reset_vote_counter: :environment do
models = [Proposal, Budget::Investment]
models.each do |model|
model.find_each do |resource|
resource.update_cached_votes
print "."
end
end
end
desc "Resets hot_score to its new value" desc "Resets hot_score to its new value"
task reset_hot_score: :environment do task reset_hot_score: :environment do
models = [Debate, Proposal, Legislation::Proposal] models = [Debate, Proposal, Legislation::Proposal]