mirror of
https://github.com/glitch-soc/mastodon.git
synced 2025-12-13 15:58:50 +00:00
Add annual reports for accounts (#28693)
This commit is contained in:
11
app/workers/generate_annual_report_worker.rb
Normal file
11
app/workers/generate_annual_report_worker.rb
Normal file
@@ -0,0 +1,11 @@
|
||||
# frozen_string_literal: true
|
||||
|
||||
class GenerateAnnualReportWorker
|
||||
include Sidekiq::Worker
|
||||
|
||||
def perform(account_id, year)
|
||||
AnnualReport.new(Account.find(account_id), year).generate
|
||||
rescue ActiveRecord::RecordNotFound, ActiveRecord::RecordNotUnique
|
||||
true
|
||||
end
|
||||
end
|
||||
@@ -24,6 +24,8 @@ class Scheduler::IndexingScheduler
|
||||
end
|
||||
end
|
||||
|
||||
private
|
||||
|
||||
def indexes
|
||||
[AccountsIndex, TagsIndex, PublicStatusesIndex, StatusesIndex]
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user