archiver: Process dirs concurrently

This commit is contained in:
Alexander Neumann 2018-04-30 15:13:03 +02:00
parent 78bd591c7c
commit 4e34325035
4 changed files with 223 additions and 53 deletions

View file

@ -27,7 +27,7 @@ type BlobSaver struct {
// NewBlobSaver returns a new blob. A worker pool is started, it is stopped
// when ctx is cancelled.
func NewBlobSaver(ctx context.Context, repo Saver, workers uint) *BlobSaver {
ch := make(chan saveBlobJob, 2*int(workers))
ch := make(chan saveBlobJob)
s := &BlobSaver{
repo: repo,
knownBlobs: restic.NewBlobSet(),