diff --git a/lib/freedom_patches/active_record_base.rb b/lib/freedom_patches/active_record_base.rb index 41ae0e91710..1d0e0c3d8c5 100644 --- a/lib/freedom_patches/active_record_base.rb +++ b/lib/freedom_patches/active_record_base.rb @@ -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