Skip to content

Commit

Permalink
Merge pull request #604 from errbit/fix/577
Browse files Browse the repository at this point in the history
Try fix isse #577 if a lot of problem
  • Loading branch information
shingara committed Nov 4, 2013
2 parents 65b4b30 + 254e2b1 commit 055347e
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions lib/tasks/errbit/database.rake
Original file line number Diff line number Diff line change
Expand Up @@ -6,16 +6,16 @@ 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

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

Expand Down

0 comments on commit 055347e

Please sign in to comment.