mirror of
https://github.com/ditkrg/idempotent-request.git
synced 2026-01-22 22:06:44 +00:00
Merge pull request #6 from nickgrim/fix-2.7-warnings
Fix Ruby 2.7 warning
This commit is contained in:
commit
22e73deadb
@ -27,14 +27,10 @@ module IdempotentRequest
|
||||
private
|
||||
|
||||
def setnx_with_expiration(key, data)
|
||||
redis.set(
|
||||
key,
|
||||
data,
|
||||
{}.tap do |options|
|
||||
options[:nx] = true
|
||||
options[:ex] = expire_time.to_i if expire_time.to_i > 0
|
||||
end
|
||||
)
|
||||
options = {nx: true}
|
||||
options[:ex] = expire_time.to_i if expire_time.to_i > 0
|
||||
|
||||
redis.set(key, data, **options)
|
||||
end
|
||||
|
||||
def lock_key(key)
|
||||
|
||||
Loading…
Reference in New Issue
Block a user