From 254e2b160f7b3ee81493319d59ab8ee35489c193 Mon Sep 17 00:00:00 2001 From: Cyril Mougel Date: Thu, 17 Oct 2013 23:20:34 +0200 Subject: [PATCH] Try fix isse #577 if a lot of problem --- lib/tasks/errbit/database.rake | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/lib/tasks/errbit/database.rake b/lib/tasks/errbit/database.rake index 60a4133c0..1286a30ef 100644 --- a/lib/tasks/errbit/database.rake +++ b/lib/tasks/errbit/database.rake @@ -6,7 +6,7 @@ namespace :errbit do desc "Updates cached attributes on Problem" task :update_problem_attrs => :environment do puts "Updating problems" - Problem.all.each{|problem| + Problem.no_timeout.all.each{|problem| ProblemUpdaterCache.new(problem).update } end @@ -14,8 +14,8 @@ namespace :errbit do desc "Updates Problem#notices_count" task :update_notices_count => :environment do puts "Updating problem.notices_count" - Problem.all.each do |p| - p.update_attributes(:notices_count => p.notices.count) + Problem.no_timeout.all.each do |pr| + pr.update_attributes(:notices_count => pr.notices.count) end end