remove last_activity from CountsReport
This data point is difficult to get with the new page views infrastructure, and isn't displayed anywhere anyway. fixes CNVS-6731 test plan: * with cassandra page views enabled, open a rails console and run Reporting::CountsReport.process * once that completes, go to /accounts/X/statistics and verify that the stats have been updated (there is a generated timestamp at the top) Change-Id: I7f1144cd6dab9b68478a79e3f7f82bc6d8feb0b3 Reviewed-on: https://gerrit.instructure.com/22046 Reviewed-by: Jacob Fugal <jacob@instructure.com> Tested-by: Jenkins <jenkins@instructure.com> QA-Review: Jeremy Putnam <jeremyp@instructure.com> Product-Review: Brian Palmer <brianp@instructure.com>
This commit is contained in:
parent
afa72b4f69
commit
d1486b6930
|
@ -46,15 +46,12 @@ class CountsReport
|
|||
Shard.with_each_shard do
|
||||
Account.root_accounts.active.each do |account|
|
||||
next if account.external_status == 'test'
|
||||
activity = CountsReport.last_activity(account.id)
|
||||
next unless activity
|
||||
|
||||
data = {}.with_indifferent_access
|
||||
data[:generated_at] = @timestamp
|
||||
data[:id] = account.id
|
||||
data[:name] = account.name
|
||||
data[:external_status] = account.external_status
|
||||
data[:last_activity] = activity
|
||||
|
||||
course_ids = get_course_ids(account)
|
||||
data[:courses] = course_ids.length
|
||||
|
@ -212,10 +209,6 @@ class CountsReport
|
|||
@overview[:totals][:users] += account[:users]
|
||||
end
|
||||
|
||||
def self.last_activity(account_id)
|
||||
PageView.where(:account_id => account_id).maximum(:created_at)
|
||||
end
|
||||
|
||||
def get_course_ids(account)
|
||||
is_default_account = account.external_status == ExternalStatuses.default_external_status.to_s
|
||||
course_ids = []
|
||||
|
|
Loading…
Reference in New Issue