Drop to a single worker in the geocode pool
I'm sharing transactions incorrectly, and until I fix that I need correctness, not speed.
This commit is contained in:
parent
5100c8f0be
commit
6945b9f9ed
1 changed files with 8 additions and 4 deletions
|
|
@ -80,10 +80,14 @@ func bulkGeocode(ctx context.Context, txn bob.Tx, file *models.FileuploadFile, c
|
|||
errors := make(chan error, len(pools))
|
||||
|
||||
var wg sync.WaitGroup
|
||||
for i := 0; i < 20; i++ {
|
||||
wg.Add(1)
|
||||
go worker(ctx, txn, client, jobs, errors, &wg)
|
||||
}
|
||||
/*
|
||||
for i := 0; i < 20; i++ {
|
||||
wg.Add(1)
|
||||
go worker(ctx, txn, client, jobs, errors, &wg)
|
||||
}
|
||||
*/
|
||||
wg.Add(1)
|
||||
go worker(ctx, txn, client, jobs, errors, &wg)
|
||||
|
||||
for _, pool := range pools {
|
||||
jobs <- &jobGeocode{
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue