mirror of
https://github.com/GopeedLab/gopeed.git
synced 2026-11-09 10:00:27 +00:00
feat: support max running tasks config (#112)
This commit is contained in:
1 parent
1e08ecd8db
commit
d9c5ca339f
22 files changed
+269
-129
No files matched your search
@@ -12,9 +12,9 @@ const (
|
||||
type StartConfig struct {
|
||||
Network string `json:"network"`
|
||||
Address string `json:"address"`
|
||||
RefreshInterval int `json:"refreshInterval"`
|
||||
Storage Storage `json:"storage"`
|
||||
StorageDir string `json:"storageDir"`
|
||||
RefreshInterval int `json:"refreshInterval"`
|
||||
ApiToken string `json:"apiToken"`
|
||||
|
||||
WebEnable bool
|
||||
@@ -28,6 +28,9 @@ func (cfg *StartConfig) Init() *StartConfig {
|
||||
if cfg.Address == "" {
|
||||
cfg.Address = "127.0.0.1:0"
|
||||
}
|
||||
if cfg.RefreshInterval == 0 {
|
||||
cfg.RefreshInterval = 350
|
||||
}
|
||||
if cfg.Storage == "" {
|
||||
cfg.Storage = StorageBolt
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user