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:
commit
05eccb116d
1 changed files with 1 additions and 1 deletions
|
@ -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
|
||||
|
|
Loading…
Reference in a new issue