1
0
mirror of https://github.com/rclone/rclone.git synced 2025-12-15 15:53:41 +00:00

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

View File

@@ -11,6 +11,7 @@ import (
"encoding/json"
"io"
_ "net/http/pprof" // install the pprof http handlers
"time"
"github.com/rclone/rclone/cmd/serve/httplib"
)
@@ -26,13 +27,16 @@ type Options struct {
WebGUIUpdate bool // set to download new update
WebGUIFetchURL string // set the default url for fetching webgui
AccessControlAllowOrigin string // set the access control for CORS configuration
JobExpireDuration time.Duration
JobExpireInterval time.Duration
}
// DefaultOpt is the default values used for Options
var DefaultOpt = Options{
HTTPOptions: httplib.DefaultOpt,
Enabled: false,
HTTPOptions: httplib.DefaultOpt,
Enabled: false,
JobExpireDuration: 60 * time.Second,
JobExpireInterval: 10 * time.Second,
}
func init() {