Class: SolidCable::Record

Inherits:
ActiveRecord::Base
  • Object
show all
Defined in:
app/models/solid_cable/record.rb

Direct Known Subclasses

Message

Class Method Summary collapse

Class Method Details

.non_blocking_lockObject



9
10
11
12
13
14
15
# File 'app/models/solid_cable/record.rb', line 9

def self.non_blocking_lock
  if SolidCable.use_skip_locked
    lock(Arel.sql("FOR UPDATE SKIP LOCKED"))
  else
    lock
  end
end