mirror of
https://github.com/discourse/discourse.git
synced 2024-11-22 09:12:45 +08:00
FIX: Update PresenceChannel#present to work for redis 6.0 (#14180)
The `LT` parameter was only added in redis 6.2. We can make do with `NX` instead
This commit is contained in:
parent
01e2836071
commit
b47f288b13
|
@ -484,9 +484,9 @@ class PresenceChannel
|
|||
added_users = 1
|
||||
redis.call('SET', mutex_key, mutex_value, 'EX', #{MUTEX_TIMEOUT_SECONDS})
|
||||
end
|
||||
-- Add the channel to the global channel list. 'LT' means the value will
|
||||
-- only be set if it's lower than the existing value
|
||||
redis.call('ZADD', channels_key, "LT", expires, tostring(channel))
|
||||
-- Add the channel to the global channel list. 'NX' means the value will
|
||||
-- only be set if doesn't already exist
|
||||
redis.call('ZADD', channels_key, "NX", expires, tostring(channel))
|
||||
end
|
||||
|
||||
redis.call('EXPIREAT', hash_key, expires + #{GC_SECONDS})
|
||||
|
|
Loading…
Reference in New Issue
Block a user