How Does Regenerating Summaries Work?

Found the problem. It’s comparing ai summary backfill topic max age days to topic.created_at, not updated_at. I think this should be changed to updated_at- I have many very active topics created two years ago which still get new posts every week, but if I use a max age of 90 days or even a year, those topics will not get summarized.

Please consider changing this.

.where("topics.created_at > current_timestamp - INTERVAL '#{max_age_days.to_i} DAY'")