1
0
Fork 0
mirror of https://github.com/rails/rails.git synced 2022-11-09 12:12:34 -05:00

Merge pull request #28360 from kbrock/transaction_fix

Handle Timeout.timeout in rails queries
This commit is contained in:
Matthew Draper 2017-11-07 08:50:44 +10:30 committed by GitHub
commit 05eccb116d
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -240,7 +240,7 @@ module ActiveRecord
rollback_transaction if transaction
else
begin
commit_transaction
commit_transaction if transaction
rescue Exception
rollback_transaction(transaction) unless transaction.state.completed?
raise