Permalink
Browse files

[FIX] class reference was wrong

  • Loading branch information...
1 parent 562a094 commit feb38cad22b8da9e479d55aa5efc34f01df66836 Elad Meidar committed Jun 3, 2012
Showing with 2 additions and 2 deletions.
  1. +1 −1 lib/deadlock_retry.rb
  2. +1 −1 lib/deadlock_retry/version.rb
@@ -24,7 +24,7 @@ def transaction_with_deadlock_handling(*objects, &block)
rescue ActiveRecord::StatementInvalid => error
raise if in_nested_transaction?
if DEADLOCK_ERROR_MESSAGES.any? { |msg| error.message =~ /#{Regexp.escape(msg)}/ }
- raise if retry_count >= self.class.transaction_lock_retries
+ raise if retry_count >= self.transaction_lock_retries
retry_count += 1
logger.info "Deadlock detected on retry #{retry_count}, restarting transaction"
exponential_pause(retry_count)
@@ -1,3 +1,3 @@
module DeadlockRetry
- VERSION = '1.2.1'
+ VERSION = '1.2.2'
end

0 comments on commit feb38ca

Please sign in to comment.