Class: SolidQueue::Record

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

Direct Known Subclasses

Execution, Job, Pause, Process, RecurringTask, Semaphore

Class Method Summary collapse

Class Method Details

.non_blocking_lockObject



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

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