Commit 254e2b160f7b3ee81493319d59ab8ee35489c193

Authored by Cyril Mougel
1 parent 471a2872
Exists in master and in 1 other branch production

Try fix isse #577 if a lot of problem

Showing 1 changed file with 3 additions and 3 deletions   Show diff stats
lib/tasks/errbit/database.rake
@@ -6,7 +6,7 @@ namespace :errbit do @@ -6,7 +6,7 @@ namespace :errbit do
6 desc "Updates cached attributes on Problem" 6 desc "Updates cached attributes on Problem"
7 task :update_problem_attrs => :environment do 7 task :update_problem_attrs => :environment do
8 puts "Updating problems" 8 puts "Updating problems"
9 - Problem.all.each{|problem| 9 + Problem.no_timeout.all.each{|problem|
10 ProblemUpdaterCache.new(problem).update 10 ProblemUpdaterCache.new(problem).update
11 } 11 }
12 end 12 end
@@ -14,8 +14,8 @@ namespace :errbit do @@ -14,8 +14,8 @@ namespace :errbit do
14 desc "Updates Problem#notices_count" 14 desc "Updates Problem#notices_count"
15 task :update_notices_count => :environment do 15 task :update_notices_count => :environment do
16 puts "Updating problem.notices_count" 16 puts "Updating problem.notices_count"
17 - Problem.all.each do |p|  
18 - p.update_attributes(:notices_count => p.notices.count) 17 + Problem.no_timeout.all.each do |pr|
  18 + pr.update_attributes(:notices_count => pr.notices.count)
19 end 19 end
20 end 20 end
21 21