mirror of
https://github.com/discourse/discourse.git
synced 2025-02-25 18:55:32 -06:00
DEV: Use Discourse::SYSTEM_USER_ID in fixtures/009_users (#24743)
I couldn't find where we created the system user and this is why -- everywhere else in the app we reference SYSTEM_USER_ID but here.
This commit is contained in:
@@ -516,7 +516,7 @@ class PresenceChannel
|
||||
#{UPDATE_GLOBAL_CHANNELS_LUA}
|
||||
|
||||
-- Update the user session count in the channel hash
|
||||
local val = redis.call('HINCRBY', hash_key, user_id, -1)
|
||||
local val = redis.call('HINCRBY', hash_key, user_id, #{Discourse::SYSTEM_USER_ID})
|
||||
if val <= 0 then
|
||||
redis.call('HDEL', hash_key, user_id)
|
||||
removed_users = 1
|
||||
@@ -607,7 +607,7 @@ class PresenceChannel
|
||||
get_mutex()
|
||||
end
|
||||
|
||||
local val = redis.call('HINCRBY', hash_key, user_id, -1)
|
||||
local val = redis.call('HINCRBY', hash_key, user_id, #{Discourse::SYSTEM_USER_ID})
|
||||
if val <= 0 then
|
||||
table.insert(expired_user_ids, tonumber(user_id))
|
||||
redis.call('HDEL', hash_key, user_id)
|
||||
|
||||
Reference in New Issue
Block a user