mirror of https://github.com/restic/restic.git
Merge pull request #3112 from MichaelEischer/reduce-progress-log-spam
Limit progress bar updates to once per second on non-terminal outputs
This commit is contained in:
commit
8a150ee91f
|
@ -16,7 +16,7 @@ func newProgressMax(show bool, max uint64, description string) *progress.Counter
|
||||||
}
|
}
|
||||||
|
|
||||||
interval := time.Second / 60
|
interval := time.Second / 60
|
||||||
if !stdinIsTerminal() {
|
if !stdoutIsTerminal() {
|
||||||
interval = time.Second
|
interval = time.Second
|
||||||
} else {
|
} else {
|
||||||
fps, err := strconv.ParseInt(os.Getenv("RESTIC_PROGRESS_FPS"), 10, 64)
|
fps, err := strconv.ParseInt(os.Getenv("RESTIC_PROGRESS_FPS"), 10, 64)
|
||||||
|
|
Loading…
Reference in New Issue