Class: Bosh::Director::Transactor
- Defined in:
- lib/bosh/director/transactor.rb
Instance Method Summary collapse
Instance Method Details
#retryable_transaction(db, &block) ⇒ Object
3 4 5 6 7 |
# File 'lib/bosh/director/transactor.rb', line 3 def retryable_transaction(db, &block) Bosh::Common.retryable(tries: 3, on: [Sequel::DatabaseError], matching: /Mysql2::Error: Deadlock found when trying to get lock/) do |attempt, e| db.transaction(&block) || true end end |