forked from TrueCloudLab/restic
backup: Remove unused filename parameter from CompleteBlob callback
This commit is contained in:
parent
258b487d8f
commit
964977677f
3 changed files with 7 additions and 7 deletions
|
@ -76,7 +76,7 @@ type Archiver struct {
|
|||
StartFile func(filename string)
|
||||
|
||||
// CompleteBlob is called for all saved blobs for files.
|
||||
CompleteBlob func(filename string, bytes uint64)
|
||||
CompleteBlob func(bytes uint64)
|
||||
|
||||
// WithAtime configures if the access time for files and directories should
|
||||
// be saved. Enabling it may result in much metadata, so it's off by
|
||||
|
@ -149,7 +149,7 @@ func New(repo restic.Repository, fs fs.FS, opts Options) *Archiver {
|
|||
|
||||
CompleteItem: func(string, *restic.Node, *restic.Node, ItemStats, time.Duration) {},
|
||||
StartFile: func(string) {},
|
||||
CompleteBlob: func(string, uint64) {},
|
||||
CompleteBlob: func(uint64) {},
|
||||
}
|
||||
|
||||
return arch
|
||||
|
@ -369,7 +369,7 @@ func (arch *Archiver) Save(ctx context.Context, snPath, target string, previous
|
|||
if arch.allBlobsPresent(previous) {
|
||||
debug.Log("%v hasn't changed, using old list of blobs", target)
|
||||
arch.CompleteItem(snPath, previous, previous, ItemStats{}, time.Since(start))
|
||||
arch.CompleteBlob(snPath, previous.Size)
|
||||
arch.CompleteBlob(previous.Size)
|
||||
node, err := arch.nodeFromFileInfo(snPath, target, fi)
|
||||
if err != nil {
|
||||
return FutureNode{}, false, err
|
||||
|
|
|
@ -25,7 +25,7 @@ type FileSaver struct {
|
|||
|
||||
ch chan<- saveFileJob
|
||||
|
||||
CompleteBlob func(filename string, bytes uint64)
|
||||
CompleteBlob func(bytes uint64)
|
||||
|
||||
NodeFromFileInfo func(snPath, filename string, fi os.FileInfo) (*restic.Node, error)
|
||||
}
|
||||
|
@ -45,7 +45,7 @@ func NewFileSaver(ctx context.Context, wg *errgroup.Group, save SaveBlobFn, pol
|
|||
pol: pol,
|
||||
ch: ch,
|
||||
|
||||
CompleteBlob: func(string, uint64) {},
|
||||
CompleteBlob: func(uint64) {},
|
||||
}
|
||||
|
||||
for i := uint(0); i < fileWorkers; i++ {
|
||||
|
@ -176,7 +176,7 @@ func (s *FileSaver) saveFile(ctx context.Context, chnker *chunker.Chunker, snPat
|
|||
return fnr
|
||||
}
|
||||
|
||||
s.CompleteBlob(f.Name(), uint64(len(chunk.Data)))
|
||||
s.CompleteBlob(uint64(len(chunk.Data)))
|
||||
|
||||
// collect already completed blobs
|
||||
for len(results) > 0 {
|
||||
|
|
|
@ -184,7 +184,7 @@ func (p *Progress) StartFile(filename string) {
|
|||
}
|
||||
|
||||
// CompleteBlob is called for all saved blobs for files.
|
||||
func (p *Progress) CompleteBlob(filename string, bytes uint64) {
|
||||
func (p *Progress) CompleteBlob(bytes uint64) {
|
||||
select {
|
||||
case p.processedCh <- Counter{Bytes: bytes}:
|
||||
case <-p.closed:
|
||||
|
|
Loading…
Reference in a new issue