Merge branch '19454-cwl-output-json' refs #19454
[arvados.git] / services / keep-balance / collection.go
index 1e1e51abe7ebcd55e5d0ed7ca55eae02a8b56504..d7a3fd981d4f03877e57b0426e739941411cf4a3 100644 (file)
@@ -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()