Module: Resque::Plugins::UniqueAtRuntime
- Defined in:
- lib/resque/plugins/unique_at_runtime.rb
Overview
Defined Under Namespace
Modules: ClassMethods
Constant Summary collapse
- ATOMIC_LOCK_SCRIPT =
<<~LUA local previous_timeout = redis.call("HGET", KEYS[1], ARGV[1]) if previous_timeout and tonumber(previous_timeout) > tonumber(ARGV[3]) then return 0 end redis.call("HSET", KEYS[1], ARGV[1], ARGV[2]) return 1 LUA
- LEGACY_LOCK_MUTEX =
Mutex.new
Class Method Summary collapse
Class Method Details
.included(base) ⇒ Object
28 29 30 |
# File 'lib/resque/plugins/unique_at_runtime.rb', line 28 def self.included(base) base.extend ClassMethods end |