1
0

update renew interval

This commit is contained in:
root 2023-05-18 23:20:24 +08:00
parent 273878d039
commit 5afc25d596
2 changed files with 3 additions and 3 deletions

View File

@ -113,5 +113,5 @@ func updateToken() {
}
// Append access token to access_tokens.json
ACCESS_TOKENS = tokens.NewAccessToken(token_list, true)
time.AfterFunc(2.16e15, updateToken)
time.AfterFunc(1.728e15, updateToken)
}

View File

@ -60,8 +60,8 @@ func init() {
} else {
nowTime := time.Now()
usedTime := nowTime.Sub(stat.ModTime())
// update access token 25 days after last modify token file
toExpire := 2.16e15 - usedTime
// update access token 20 days after last modify token file
toExpire := 1.728e15 - usedTime
if toExpire > 0 {
file, err := os.Open("access_tokens.json")
if err != nil {