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:
10
fs/rc/rc.go
10
fs/rc/rc.go
@@ -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() {
|
||||
|
||||
Reference in New Issue
Block a user