Update tag.rb redis

This commit is contained in:
admin 2021-01-16 18:47:38 +00:00
parent 29cfe511d1
commit 3344afbb3d
1 changed files with 6 additions and 2 deletions

View File

@ -55,8 +55,12 @@ class Tag < ApplicationRecord
days << { days << {
day: day.to_s, day: day.to_s,
uses: Redis.current.get("activity:tags:#{id}:#{day}") || '0', uses: Redis.current.with do |conn|
accounts: Redis.current.pfcount("activity:tags:#{id}:#{day}:accounts").to_s, conn.get("activity:tags:#{id}:#{day}") || '0'
end,
accounts: Redis.current.with do |conn|
conn.pfcount("activity:tags:#{id}:#{day}:accounts").to_s
end,
} }
end end