Stop Counters where they're constructed and started

This commit is contained in:
greatroar
2020-11-08 21:03:59 +01:00
parent ddca699cd2
commit 21b787a4d1
8 changed files with 7 additions and 11 deletions

View File

@@ -25,8 +25,6 @@ const numRepackWorkers = 8
// The map keepBlobs is modified by Repack, it is used to keep track of which
// blobs have been processed.
func Repack(ctx context.Context, repo restic.Repository, packs restic.IDSet, keepBlobs restic.BlobSet, p *progress.Counter) (obsoletePacks restic.IDSet, err error) {
defer p.Done()
debug.Log("repacking %d packs while keeping %d blobs", len(packs), len(keepBlobs))
wg, wgCtx := errgroup.WithContext(ctx)