From 4d90ed752b7dde749fae6797ee3eb4c8d2cafafc Mon Sep 17 00:00:00 2001 From: p31729568 Date: Tue, 3 Sep 2019 14:21:58 +0800 Subject: [PATCH] fix --- app/libs/util/redis.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/libs/util/redis.rb b/app/libs/util/redis.rb index 3acd1cef7..f240406f5 100644 --- a/app/libs/util/redis.rb +++ b/app/libs/util/redis.rb @@ -2,7 +2,7 @@ module Util::Redis class << self def online_user_count if Rails.cache.is_a?(ActiveSupport::Cache::RedisStore) - Rails.cache.data.scan(0, match: 'cache:_session_id:*', count: 100000).last.size + Rails.cache.data.scan(0, match: 'cache:_session_id:*', count: 100000).last.uniq.size end end end