Avoid querying too few repos from each single PDS

main
Max Ignatenko 2024-05-06 21:14:18 +01:00
parent 1201ee3868
commit f315059994
1 changed files with 3 additions and 0 deletions

View File

@ -110,6 +110,9 @@ func (s *Scheduler) fillQueue(ctx context.Context) error {
if len(remotes) > 0 {
perPDSLimit = maxQueueLen * 2 / len(remotes)
}
if perPDSLimit < maxQueueLen/10 {
perPDSLimit = maxQueueLen / 10
}
// Fake remote to account for repos we didn't have a PDS for yet.
remotes = append(remotes, pds.PDS{ID: pds.Unknown})