Skip to content

Commit

Permalink
Merge pull request resque#796 from njalldev/filter-backtrace-refactoring
Browse files Browse the repository at this point in the history
filter backtrace to redis with take_while
  • Loading branch information
steveklabnik committed Jan 19, 2013
2 parents 92dfd04 + bb4abb9 commit cffe4a0
Showing 1 changed file with 1 addition and 6 deletions.
7 changes: 1 addition & 6 deletions lib/resque/failure/redis.rb
Expand Up @@ -52,12 +52,7 @@ def self.remove(index)
end

def filter_backtrace(backtrace)
index = backtrace.index { |item| item.include?('/lib/resque/job.rb') }.to_i
if index == 0
backtrace
else
backtrace.first(index)
end
backtrace.take_while { |item| !item.include?('/lib/resque/job.rb') }
end
end
end
Expand Down

0 comments on commit cffe4a0

Please sign in to comment.