Commit 29fc7b7a5d013b12f55fc0e27645155dd54f0642

Authored by Nathan Broadbent
1 parent ed82bd64
Exists in master and in 1 other branch production

Fixed normalize_backtrace method in errbit:db:regenerate_fingerprints task

Showing 1 changed file with 4 additions and 4 deletions   Show diff stats
lib/tasks/errbit/database.rake
@@ -2,13 +2,13 @@ require 'digest/sha1' @@ -2,13 +2,13 @@ require 'digest/sha1'
2 2
3 namespace :errbit do 3 namespace :errbit do
4 namespace :db do 4 namespace :db do
5 - 5 +
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(&:cache_notice_attributes) 9 Problem.all.each(&:cache_notice_attributes)
10 end 10 end
11 - 11 +
12 desc "Updates Problem#notices_count" 12 desc "Updates Problem#notices_count"
13 task :update_notices_count => :environment do 13 task :update_notices_count => :environment do
14 puts "Updating problem.notices_count" 14 puts "Updating problem.notices_count"
@@ -16,7 +16,7 @@ namespace :errbit do @@ -16,7 +16,7 @@ namespace :errbit do
16 p.update_attributes(:notices_count => p.notices.count) 16 p.update_attributes(:notices_count => p.notices.count)
17 end 17 end
18 end 18 end
19 - 19 +
20 desc "Delete resolved errors from the database. (Useful for limited heroku databases)" 20 desc "Delete resolved errors from the database. (Useful for limited heroku databases)"
21 task :clear_resolved => :environment do 21 task :clear_resolved => :environment do
22 count = Problem.resolved.count 22 count = Problem.resolved.count
@@ -29,7 +29,7 @@ namespace :errbit do @@ -29,7 +29,7 @@ namespace :errbit do
29 29
30 def normalize_backtrace(backtrace) 30 def normalize_backtrace(backtrace)
31 backtrace[0...3].map do |trace| 31 backtrace[0...3].map do |trace|
32 - trace.merge 'method' => trace['method'].gsub(/[0-9_]{10,}+/, "__FRAGMENT__") 32 + trace.merge 'method' => trace['method'].to_s.gsub(/[0-9_]{10,}+/, "__FRAGMENT__")
33 end 33 end
34 end 34 end
35 35