mirror of
https://github.com/restic/restic.git
synced 2025-11-02 08:23:03 +00:00
Initial implementation of JSON progress reporter
This commit is contained in:
committed by
Alexander Neumann
parent
1107eef215
commit
f645306a18
@@ -254,9 +254,9 @@ func formatBytes(c uint64) string {
|
||||
}
|
||||
}
|
||||
|
||||
// CompleteItemFn is the status callback function for the archiver when a
|
||||
// CompleteItem is the status callback function for the archiver when a
|
||||
// file/dir has been saved successfully.
|
||||
func (b *Backup) CompleteItemFn(item string, previous, current *restic.Node, s archiver.ItemStats, d time.Duration) {
|
||||
func (b *Backup) CompleteItem(item string, previous, current *restic.Node, s archiver.ItemStats, d time.Duration) {
|
||||
b.summary.Lock()
|
||||
b.summary.ItemStats.Add(s)
|
||||
b.summary.Unlock()
|
||||
@@ -365,3 +365,9 @@ func (b *Backup) Finish() {
|
||||
formatDuration(time.Since(b.start)),
|
||||
)
|
||||
}
|
||||
|
||||
// SetMinUpdatePause sets b.MinUpdatePause. It satisfies the
|
||||
// ArchiveProgressReporter interface.
|
||||
func (b *Backup) SetMinUpdatePause(d time.Duration) {
|
||||
b.MinUpdatePause = d
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user