Sha256: 0bccb15d68d426522e1368dd3235ead35efb71c3b6460709ff0e50ce042159e1

Contents?: true

Size: 470 Bytes

Versions: 3

Compression:

Stored size: 470 Bytes

Contents

module RSched


class Lock
  def initialize(hostname, timeout)
    @hostname = hostname
    @timeout = timeout
  end

  attr_reader :hostname, :timeout

  # acquired=token, locked=false, finished=nil
  def acquire(ident, time, now=Time.now.to_i)
  end

  def release(token)
  end

  def finish(token, now=Time.now.to_i)
  end

  def extend_timeout(token, timeout=Time.now.to_i+@timeout)
  end

  def delete_before(ident, time)
  end
end


end

require 'rsched/dblock'

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
rsched-0.3.3 lib/rsched/lock.rb
rsched-0.3.2 lib/rsched/lock.rb
rsched-0.3.1 lib/rsched/lock.rb