Merge branch 'main' into glitch-soc/merge-upstream
Conflicts: - `app/controllers/admin/dashboard_controller.rb`: Upstream completely redesigned the admin dashboard. glitch-soc tracked extra features, but that list is gone. Followed upstram. - `app/views/admin/dashboard/index.html.haml` Upstream completely redesigned the admin dashboard. glitch-soc tracked extra features, but that list is gone. Followed upstram.
This commit is contained in:
@ -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
|
||||
|
Reference in New Issue
Block a user