Render weekly highlights considering periods of inactivity

This commit is contained in:
Jorge Manrubia
2025-09-01 17:09:43 +02:00
parent 5b68750713
commit dfbc77c2e5
8 changed files with 64 additions and 26 deletions
@@ -0,0 +1,13 @@
#!/usr/bin/env ruby
require_relative "../config/environment"
WEEKS_TO_BACKFILL = 20
ApplicationRecord.with_each_tenant do |tenant|
WEEKS_TO_BACKFILL.times do |index|
User.find_each do |user|
user.generate_weekly_highlights(Time.current - index.weeks)
end
end
end