Commit 055347e2e514c3f7f919e7df7b76f2cf21d0080a
Exists in
master
and in
1 other branch
Merge pull request #604 from errbit/fix/577
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 | 6 | desc "Updates cached attributes on Problem" |
7 | 7 | task :update_problem_attrs => :environment do |
8 | 8 | puts "Updating problems" |
9 | - Problem.all.each{|problem| | |
9 | + Problem.no_timeout.all.each{|problem| | |
10 | 10 | ProblemUpdaterCache.new(problem).update |
11 | 11 | } |
12 | 12 | end |
... | ... | @@ -14,8 +14,8 @@ namespace :errbit do |
14 | 14 | desc "Updates Problem#notices_count" |
15 | 15 | task :update_notices_count => :environment do |
16 | 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 | 19 | end |
20 | 20 | end |
21 | 21 | ... | ... |