This commit is contained in:
Claire 2026-07-28 07:54:42 +00:00 committed by GitHub
commit 3fd631eda2
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -30,7 +30,7 @@ class AnnualReport
def eligible?
with_read_replica do
SOURCES.all? { |klass| klass.new(@account, @year).eligible? }
sufficient_post_retention? && SOURCES.all? { |klass| klass.new(@account, @year).eligible? }
end
end
@ -67,6 +67,10 @@ class AnnualReport
private
def sufficient_post_retention?
@account.statuses_cleanup_policy.nil? || @account.statuses_cleanup_policy.min_status_age > 6.months.seconds
end
def data
with_read_replica do
SOURCES.each_with_object({}) { |klass, hsh| hsh.merge!(klass.new(@account, @year).generate) }