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:
Martin Brennan
2023-12-07 09:04:45 +10:00
committed by GitHub
parent c197f8c6ee
commit 7afb5fc481
8 changed files with 17 additions and 17 deletions

View File

@@ -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)