Tweak rate limit a little bit

main
Max Ignatenko 2024-04-14 12:58:42 +01:00
parent bc24c23afc
commit c364822818
1 changed files with 2 additions and 1 deletions

View File

@ -51,7 +51,8 @@ func NewMirror(ctx context.Context, upstream string, db *gorm.DB) (*Mirror, erro
return &Mirror{
db: db,
upstream: u,
limiter: rate.NewLimiter(rate.Limit(2), 4),
// Current rate limit is `500 per five minutes`, lets stay a bit under it.
limiter: rate.NewLimiter(rate.Limit(450.0/300), 4),
}, nil
}