Sha256: e14b58105bf64b14c9399e92c77f9269f3677d8cbbb93479cb549dd3ffd5519f

Contents?: true

Size: 498 Bytes

Versions: 1

Compression:

Stored size: 498 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, next_timeout=Time.now.to_i)
  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

1 entries across 1 versions & 1 rubygems

Version Path
rsched-0.3.0 lib/rsched/lock.rb