Merge pull request #5014 from MichaelEischer/configurable-slow-request-timeout

Make timeout for slow requests configurable
This commit is contained in:
Michael Eischer
2024-08-29 16:52:24 +02:00
committed by GitHub
4 changed files with 36 additions and 1 deletions

View File

@@ -140,6 +140,7 @@ func init() {
f.UintVar(&globalOptions.PackSize, "pack-size", 0, "set target pack `size` in MiB, created pack files may be larger (default: $RESTIC_PACK_SIZE)")
f.StringSliceVarP(&globalOptions.Options, "option", "o", []string{}, "set extended option (`key=value`, can be specified multiple times)")
f.StringVar(&globalOptions.HTTPUserAgent, "http-user-agent", "", "set a http user agent for outgoing http requests")
f.DurationVar(&globalOptions.StuckRequestTimeout, "stuck-request-timeout", 5*time.Minute, "`duration` after which to retry stuck requests")
// Use our "generate" command instead of the cobra provided "completion" command
cmdRoot.CompletionOptions.DisableDefaultCmd = true