Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Limit actors loaded on queue (re)load #144

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

KevSlashNull
Copy link
Collaborator

This limits the number of actor profiles loaded in the approval queue on initial load and any subsequent refresh to 102.

While this change hides the true number of accounts in the queue, this prevents that in the admittedly unlikely but possible scenario described by Toon (internal), we can process the queue relatively performant.

In the long term, I want to show the total number of queued accounts and only load a single account—especially with how we might change how the queue is interacted with—, but for now this is a good patch.

Screenshots

Because of the limit change, the pending count now summarizes the pending count as 100+ if there are more than 100 accounts in the queue.

Before After
image image

@vercel
Copy link

vercel bot commented Aug 20, 2023

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Updated (UTC)
bsky-furry-feed-admin ✅ Ready (Inspect) Visit Preview Aug 20, 2023 0:43am
1 Ignored Deployment
Name Status Preview Updated (UTC)
bsky-furry-feed-info ⬜️ Ignored (Inspect) Aug 20, 2023 0:43am

actors, err := s.queries.ListCandidateActors(ctx, statusFilter)
actors, err := s.queries.ListCandidateActors(ctx, gen.ListCandidateActorsParams{
Status: statusFilter,
Limit: opts.Limit,
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This change breaks the CandidateActorCache as that hasn't been updated to pass a limit in - so 0 will be used. We may need to build pagination into that before we can do this 😓

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants