rc: move job expire flags to rc to fix initalization problem

See: https://forum.rclone.org/t/rc-rc-job-expire-interval-bug/11188

rclone was ignoring the --rc-job-expire-duration and --rc-job-interval
flags.  This turned out to be an initialization order problem and was
fixed by moving those flags out of global config into rc config.
This commit is contained in:
Nick Craig-Wood
2019-08-10 17:12:22 +01:00
parent 0693deea1c
commit 3ecbd603ab
7 changed files with 28 additions and 22 deletions
-4
View File
@@ -100,8 +100,6 @@ type ConfigInfo struct {
ClientKey string // Client Side Key
MultiThreadCutoff SizeSuffix
MultiThreadStreams int
RcJobExpireDuration time.Duration
RcJobExpireInterval time.Duration
}
// NewConfig creates a new config with everything set to the default
@@ -136,8 +134,6 @@ func NewConfig() *ConfigInfo {
// c.StatsOneLineDateFormat = "2006/01/02 15:04:05 - "
c.MultiThreadCutoff = SizeSuffix(250 * 1024 * 1024)
c.MultiThreadStreams = 4
c.RcJobExpireDuration = 60 * time.Second
c.RcJobExpireInterval = 10 * time.Second
return c
}