mirror of
https://github.com/rclone/rclone.git
synced 2025-12-11 22:14:05 +01:00
cmd: refactor --retries and --retries-sleep to global config
This change moves the --retries and --retries-sleep flags/variables from cmd to config (consistent with --low-level-retries), so that they can be more easily referenced from subcommands.
This commit is contained in:
@@ -72,8 +72,10 @@ type ConfigInfo struct {
|
||||
DeleteMode DeleteMode
|
||||
MaxDelete int64
|
||||
MaxDeleteSize SizeSuffix
|
||||
TrackRenames bool // Track file renames.
|
||||
TrackRenamesStrategy string // Comma separated list of strategies used to track renames
|
||||
TrackRenames bool // Track file renames.
|
||||
TrackRenamesStrategy string // Comma separated list of strategies used to track renames
|
||||
Retries int // High-level retries
|
||||
RetriesInterval time.Duration // --retries-sleep
|
||||
LowLevelRetries int
|
||||
UpdateOlder bool // Skip files that are newer on the destination
|
||||
NoGzip bool // Disable compression
|
||||
@@ -171,6 +173,7 @@ func NewConfig() *ConfigInfo {
|
||||
c.DeleteMode = DeleteModeDefault
|
||||
c.MaxDelete = -1
|
||||
c.MaxDeleteSize = SizeSuffix(-1)
|
||||
c.Retries = 3
|
||||
c.LowLevelRetries = 10
|
||||
c.MaxDepth = -1
|
||||
c.DataRateUnit = "bytes"
|
||||
|
||||
Reference in New Issue
Block a user