Skip to content
This repository has been archived by the owner on Dec 21, 2023. It is now read-only.

Commit

Permalink
FeedManager: skip account when target_account's last status is too old (
Browse files Browse the repository at this point in the history
mastodon#18009)

Co-authored-by: dogelover911 <dogelover911@localhost>
  • Loading branch information
dogelover911 and dogelover911 authored Apr 11, 2022
1 parent dc50347 commit 4c99495
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion app/lib/feed_manager.rb
Original file line number Diff line number Diff line change
Expand Up @@ -243,7 +243,7 @@ def populate_home(account)
account.following.includes(:account_stat).find_each do |target_account|
if redis.zcard(timeline_key) >= limit
oldest_home_score = redis.zrange(timeline_key, 0, 0, with_scores: true).first.last.to_i
last_status_score = Mastodon::Snowflake.id_at(account.last_status_at)
last_status_score = Mastodon::Snowflake.id_at(target_account.last_status_at)

# If the feed is full and this account has not posted more recently
# than the last item on the feed, then we can skip the whole account
Expand Down

0 comments on commit 4c99495

Please sign in to comment.