about summary refs log tree commit diff
path: root/app/presenters
diff options
context:
space:
mode:
Diffstat (limited to 'app/presenters')
-rw-r--r--app/presenters/instance_presenter.rb4
1 files changed, 2 insertions, 2 deletions
diff --git a/app/presenters/instance_presenter.rb b/app/presenters/instance_presenter.rb
index 8cd774abe..3e85faa92 100644
--- a/app/presenters/instance_presenter.rb
+++ b/app/presenters/instance_presenter.rb
@@ -24,8 +24,8 @@ class InstancePresenter
     Rails.cache.fetch('user_count') { User.confirmed.joins(:account).merge(Account.without_suspended).count }
   end
 
-  def active_user_count(weeks = 4)
-    Rails.cache.fetch("active_user_count/#{weeks}") { Redis.current.pfcount(*(0...weeks).map { |i| "activity:logins:#{i.weeks.ago.utc.to_date.cweek}" }) }
+  def active_user_count(num_weeks = 4)
+    Rails.cache.fetch("active_user_count/#{num_weeks}") { ActivityTracker.new('activity:logins', :unique).sum(num_weeks.weeks.ago) }
   end
 
   def status_count