diff --git a/lib/distributed_mutex.rb b/lib/distributed_mutex.rb index 0dc4b86047b..cf9d3c48c90 100644 --- a/lib/distributed_mutex.rb +++ b/lib/distributed_mutex.rb @@ -1,6 +1,6 @@ # Cross-process locking using Redis. class DistributedMutex - DEFAULT_VALIDITY = 60 + DEFAULT_VALIDITY ||= 60 def self.synchronize(key, redis: nil, validity: DEFAULT_VALIDITY, &blk) self.new(