Method: Munificent::KeyAssignment::KeyManager#lock_unassigned_key
- Defined in:
- app/services/munificent/key_assignment/key_manager.rb
#lock_unassigned_key(game, fundraiser: nil) ⇒ Object
8 9 10 11 12 13 14 |
# File 'app/services/munificent/key_assignment/key_manager.rb', line 8 def lock_unassigned_key(game, fundraiser: nil) # https://api.rubyonrails.org/v6.1.0/classes/ActiveRecord/Locking/Pessimistic.html # https://www.postgresql.org/docs/9.5/sql-select.html#SQL-FOR-UPDATE-SHARE Munificent::Key.transaction do yield unassigned_key(game, fundraiser:) end end |