Fix Ruby 2.7 warning

This commit is contained in:
Nick Grimshaw 2021-05-04 16:44:06 +01:00
parent 5165c5f965
commit 55db7b816c

View File

@ -27,14 +27,10 @@ module IdempotentRequest
private
def setnx_with_expiration(key, data)
redis.set(
key,
data,
{}.tap do |options|
options[:nx] = true
options = {nx: true}
options[:ex] = expire_time.to_i if expire_time.to_i > 0
end
)
redis.set(key, data, **options)
end
def lock_key(key)