class Procrastinate::Runtime

An instance of this class obtained from the scheduler can be used to perform synchronisation and other communication with the scheduler.

Public Instance Methods

lock(name) { || ... } click to toggle source
# File lib/procrastinate/runtime.rb, line 6
def lock(name)
  lock = Procrastinate::Lock.new(name)
  
  lock.synchronize do
    yield
  end
end