fix 屏蔽更新日志

This commit is contained in:
ZJY 2021-09-16 10:25:04 +08:00
parent 04b4b27d2d
commit adf4142dcd

View File

@ -139,9 +139,10 @@ func updateCookie() {
l := len(cks)
logs.Info(l)
xx := 0
yy := 0
(&JdCookie{}).Push("开始定时更新转换Wskey")
for i := range cks {
if len(cks[i].WsKey) > 0 {
xx++
time.Sleep(10 * time.Second)
ck := cks[i]
//JdCookie{}.Push(fmt.Sprintf("更新账号账号,%s", ck.Nickname))
@ -158,13 +159,16 @@ func updateCookie() {
PtPin: ptPin,
}
if nck, err := GetJdCookie(ck.PtPin); err == nil {
xx++
nck.InPool(ck.PtKey)
msg := fmt.Sprintf("定时更新账号,%s", ck.PtPin)
(&JdCookie{}).Push(msg)
logs.Info(msg)
//msg := fmt.Sprintf("定时更新账号,%s", ck.PtPin)
//不再发送成功提醒
//(&JdCookie{}).Push(msg)
//logs.Info(msg)
} else {
yy++
nck.Update(Available, false)
(&JdCookie{}).Push("转换失败")
(&JdCookie{}).Push(fmt.Sprintf("转换失败%s", ck.PtPin))
}
go func() {
Save <- &JdCookie{}
@ -172,7 +176,7 @@ func updateCookie() {
}
}
}
(&JdCookie{}).Push(fmt.Sprintf("所有CK转换完成共%d个", xx))
(&JdCookie{}).Push(fmt.Sprintf("所有CK转换完成共%d个,转换失败个数共%d个", xx, yy))
}
func CookieOK(ck *JdCookie) bool {