Sha256: 3a626219361acd70605e17a4ffeedee4b759d13cb552cd7de5d6b21624daad16
Contents?: true
Size: 494 Bytes
Versions: 13
Compression:
Stored size: 494 Bytes
Contents
require 'resque/scheduler/lock/base' module Resque class Scheduler module Lock class Basic < Base def acquire! if Resque.redis.setnx(key, value) extend_lock! true end end def locked? if Resque.redis.get(key) == value extend_lock! if Resque.redis.get(key) == value return true end end false end end end end end
Version data entries
13 entries across 13 versions & 1 rubygems