mirror of
https://github.com/kopia/kopia.git
synced 2026-10-20 13:14:45 -04:00
fix(cli): added output to indicate completion of snapshot verification (#3275)
This commit is contained in:
1 parent
c9e8347821
commit
06af162394
2 files changed
+8
No files matched your search
@@ -69,6 +69,7 @@ func (c *commandSnapshotVerify) run(ctx context.Context, rep repo.Repository) er
|
||||
}
|
||||
|
||||
v := snapshotfs.NewVerifier(ctx, rep, opts)
|
||||
defer v.ShowFinalStats(ctx)
|
||||
|
||||
//nolint:wrapcheck
|
||||
return v.InParallel(ctx, func(tw *snapshotfs.TreeWalker) error {
|
||||
|
||||
@@ -49,6 +49,13 @@ func (v *Verifier) ShowStats(ctx context.Context) {
|
||||
verifierLog(ctx).Infof("Processed %v objects.", processed)
|
||||
}
|
||||
|
||||
// ShowFinalStats logs final verification statistics.
|
||||
func (v *Verifier) ShowFinalStats(ctx context.Context) {
|
||||
processed := v.processed.Load()
|
||||
|
||||
verifierLog(ctx).Infof("Finished processing %v objects.", processed)
|
||||
}
|
||||
|
||||
// VerifyFile verifies a single file object (using content check, blob map check or full read).
|
||||
func (v *Verifier) VerifyFile(ctx context.Context, oid object.ID, entryPath string) error {
|
||||
verifierLog(ctx).Debugf("verifying object %v", oid)
|
||||
|
||||
Reference in new issue
Block a user