Refactor code for newer Redis
This commit is contained in:
parent
4c6c81171b
commit
b0bfc290c4
@ -30,8 +30,7 @@ class RemoteStorageAuthorization < ApplicationRecord
|
||||
|
||||
def delete_token_from_redis
|
||||
key = "rs:authorizations:#{user.address}:#{token}"
|
||||
# You can't delete multiple members of a set with Redis 2
|
||||
redis.smembers(key).each { |auth| redis.srem(key, auth) }
|
||||
redis.srem? key, redis.smembers(key)
|
||||
end
|
||||
|
||||
private
|
||||
|
Loading…
x
Reference in New Issue
Block a user