Render weekly highlights considering periods of inactivity
This commit is contained in:
@@ -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
|
||||
Reference in New Issue
Block a user