Method: Cells::TransactionRecord#committed!

Defined in:
app/models/cells/transaction_record.rb

#committed!(should_run_callbacks: true) ⇒ Object

rubocop:disable Lint/UnusedMethodArgument – this needs to follow the interface

Raises:



117
118
119
120
121
122
123
124
# File 'app/models/cells/transaction_record.rb', line 117

def committed!(should_run_callbacks: true) # rubocop:disable Lint/UnusedMethodArgument -- this needs to follow the interface
  raise Error, 'Already done' if done
  raise Error, 'No lease created' unless outstanding_lease

  outstanding_lease.send_commit_update!(deadline: deadline)
  outstanding_lease.destroy! # the lease is no longer needed
  @done = true
end