X-Git-Url: https://git.arvados.org/arvados.git/blobdiff_plain/7af0535d3b0d7960152b06b7211c26bfd7b208cb..91ebfb6d3812313dfa13caa75a6e5fb426c0d519:/services/keep-balance/collection.go diff --git a/services/keep-balance/collection.go b/services/keep-balance/collection.go index 1e1e51abe7..d7a3fd981d 100644 --- a/services/keep-balance/collection.go +++ b/services/keep-balance/collection.go @@ -2,7 +2,7 @@ // // SPDX-License-Identifier: AGPL-3.0 -package main +package keepbalance import ( "context" @@ -152,7 +152,7 @@ func (bal *Balancer) updateCollections(ctx context.Context, c *arvados.Client, c // Use about 1 goroutine per 2 CPUs. Based on experiments with // a 2-core host, using more concurrent database // calls/transactions makes this process slower, not faster. - for i := 0; i < runtime.NumCPU()+1/2; i++ { + for i := 0; i < (runtime.NumCPU()+1)/2; i++ { wg.Add(1) goSendErr(errs, func() error { defer wg.Done()