Adjust deadlock trap to match postgres format.

This commit is contained in:
Robin Ward 2013-02-15 11:48:38 -05:00
parent 5c4e6c9f2c
commit 674c861eaf
1 changed files with 1 additions and 1 deletions

View File

@ -25,7 +25,7 @@ class ActiveRecord::Base
begin
yield
rescue ActiveRecord::StatementInvalid => e
if e.message =~ /Deadlock found when trying to get lock/ and (retries.nil? || retries > 0)
if e.message =~ /deadlock detected/ and (retries.nil? || retries > 0)
retry_lock_error(retries ? retries - 1 : nil, &block)
else
raise e