Skip to content

Commit

Permalink
Remove brakes and use more workers
Browse files Browse the repository at this point in the history
  • Loading branch information
ResamVi committed May 5, 2023
1 parent a30f1a4 commit a21e483
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion backend/fetch/fetcher/fetcher.go
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ func (f *Fetcher) Fetch() ([]model.Server, error) {
}

result := make([]model.Server, 0)
for _, entry := range servers { // TODO: Temporary
for _, entry := range servers {
country, continent, iso := entry.Location(f.geoip)

server := model.Server{
Expand Down
4 changes: 2 additions & 2 deletions backend/fetch/klei/servers.go
Original file line number Diff line number Diff line change
Expand Up @@ -65,10 +65,10 @@ func (d Server) Location(geoip *geoip2.Reader) (string, string, string) {
func Servers(lobby []LobbyEntry, region string) ([]Server, int) {
var result []Server

wp := workerpool.New(100)
wp := workerpool.New(1000)

ch := make(chan struct{}, len(lobby))
for _, entry := range lobby[:200] { // TODO: temp
for _, entry := range lobby {
wp.Submit(func() {
details, err := readEntry(entry, region)
if err != nil {
Expand Down

0 comments on commit a21e483

Please sign in to comment.