From adf4142dcd291ff5fbd609a260db370396ed64c2 Mon Sep 17 00:00:00 2001 From: ZJY <764763903@qq.com> Date: Thu, 16 Sep 2021 10:25:04 +0800 Subject: [PATCH] =?UTF-8?q?fix=20=E5=B1=8F=E8=94=BD=E6=9B=B4=E6=96=B0?= =?UTF-8?q?=E6=97=A5=E5=BF=97?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- models/available.go | 16 ++++++++++------ 1 file changed, 10 insertions(+), 6 deletions(-) diff --git a/models/available.go b/models/available.go index 01509e8..dc546eb 100644 --- a/models/available.go +++ b/models/available.go @@ -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 {