class SidekiqUniqueJobs::Key
@author Mikael Henriksson <mikael@mhenrixon.com>
Key class wraps logic dealing with various lock keys
def ==(other)
-
(true, false)
-
Parameters:
-
other
(Key
) -- the key to compare with
def ==(other) digest == other.digest end
def initialize(digest)
-
digest
(String
) -- the digest to use as key
def initialize(digest) @digest = digest @queued = suffixed_key("QUEUED") @primed = suffixed_key("PRIMED") @locked = suffixed_key("LOCKED") @info = suffixed_key("INFO") @changelog = CHANGELOGS @digests = DIGESTS end
def inspect
- See: to_s -
def inspect digest end
def suffixed_key(variable)
def suffixed_key(variable) "#{digest}:#{variable}" end
def to_a
-
(Array)
- an ordered array with all keys
def to_a [digest, queued, primed, locked, info, changelog, digests] end
def to_s
-
(String)
-
def to_s digest end