modified internal/cluster/social.go +1 -1
| @@ -49,7 +49,7 @@ func (e *Engine) ComputeFollowDistancesIncremental(ctx context.Context) error { |
| 49 | 49 | |
| 50 | 50 | var lastComputed string |
| 51 | 51 | err = e.db.QueryRowContext(ctx, ` |
| 52 | | - SELECT COALESCE(MAX(updated_at), '1970-01-01') FROM user_similarity |
| 52 | + SELECT COALESCE(MAX(computed_at), '1970-01-01') FROM user_similarity |
| 53 | 53 | `).Scan(&lastComputed) |
| 54 | 54 | if err != nil { |
| 55 | 55 | return err |
| @@ -49,7 +49,7 @@ func (e *Engine) ComputeFollowDistancesIncremental(ctx context.Context) error { |
| 49 | | 49 | |
| 50 | var lastComputed string | 50 | var lastComputed string |
| 51 | err = e.db.QueryRowContext(ctx, ` | 51 | err = e.db.QueryRowContext(ctx, ` |
| 52 | - SELECT COALESCE(MAX(updated_at), '1970-01-01') FROM user_similarity | 52 | + SELECT COALESCE(MAX(computed_at), '1970-01-01') FROM user_similarity |
| 53 | `).Scan(&lastComputed) | 53 | `).Scan(&lastComputed) |
| 54 | if err != nil { | 54 | if err != nil { |
| 55 | return err | 55 | return err |
modified internal/server/server.go +4 -0
| @@ -405,6 +405,10 @@ func (s *Server) refreshUserFeeds(ctx context.Context, userDID string) { |
| 405 | 405 | return |
| 406 | 406 | } |
| 407 | 407 | |
| 408 | + // Fetch each feed once, even if many users subscribe to the same feed. |
| 409 | + // Dead feeds (error_count >= 25) are intentionally retried here so a new |
| 410 | + // user's subscriptions get a chance to succeed before being gated by the |
| 411 | + // scheduler's error_count filter. |
| 408 | 412 | seen := make(map[string]bool, len(subs)) |
| 409 | 413 | for _, sub := range subs { |
| 410 | 414 | if seen[sub.FeedURL] { |
| @@ -405,6 +405,10 @@ func (s *Server) refreshUserFeeds(ctx context.Context, userDID string) { |
| 405 | return | 405 | return |
| 406 | } | 406 | } |
| 407 | | 407 | |
| | 408 | + // Fetch each feed once, even if many users subscribe to the same feed. |
| | 409 | + // Dead feeds (error_count >= 25) are intentionally retried here so a new |
| | 410 | + // user's subscriptions get a chance to succeed before being gated by the |
| | 411 | + // scheduler's error_count filter. |
| 408 | seen := make(map[string]bool, len(subs)) | 412 | seen := make(map[string]bool, len(subs)) |
| 409 | for _, sub := range subs { | 413 | for _, sub := range subs { |
| 410 | if seen[sub.FeedURL] { | 414 | if seen[sub.FeedURL] { |