chore: add default value for backoff

This commit is contained in:
Mmx
2024-09-24 23:53:47 +08:00
parent e27db2def6
commit e68bd88e05
2 changed files with 6 additions and 1 deletions

View File

@@ -18,7 +18,7 @@ func main() {
if err = controllers.Login(nil, false); err != nil { if err = controllers.Login(nil, false); err != nil {
logger.Errorln("登录出错: ", err) logger.Errorln("登录出错: ", err)
if !config.Settings.Log.DebugLevel { if !config.Settings.Log.DebugLevel {
logger.Infoln("开启调试日志debug_level获取详细信息") logger.Infoln("开启调试日志 (debug_level) 获取详细信息")
} }
return return
} }

View File

@@ -41,5 +41,10 @@ var defaultConfig = ConfFromFile{
CustomHeader: map[string]interface{}{ CustomHeader: map[string]interface{}{
"User-Agent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/119.0.0.0 Safari/537.36", "User-Agent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/119.0.0.0 Safari/537.36",
}, },
Backoff: BackoffConf{
InitialDuration: 2,
MaxDuration: 300,
ExponentFactor: 1,
},
}, },
} }