Skip to content

Commit

Permalink
修复返回G报错处理 == 暂时没查到问题所在 修改为不终结程序
Browse files Browse the repository at this point in the history
  • Loading branch information
xiaoyi510 committed Jan 7, 2022
1 parent 5ea456b commit 0bbcfcb
Showing 1 changed file with 8 additions and 3 deletions.
11 changes: 8 additions & 3 deletions internal/handler/cron.go
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,11 @@ func (this *handleCron) Run() {
err, s := service.ServiceCron.GetSync().Maindata()
if err != nil {
log.Println("获取种子列表失败", err)
return
// 间隔扫描时间
this.checkScanTime(0)
// 检查登录状态是否合法
this.checkLogin()
continue
}

// 定义需要处理的种子列表
Expand Down Expand Up @@ -168,8 +172,9 @@ func (this *handleCron) checkScanTime(setLimitCount int) {
}
limitTime = 10
}

log.Println("扫描完成 \r\n\t\t共扫描到提交限制分享种子数量:" + strconv.Itoa(setLimitCount) + "个")
if setLimitCount > 0 {
log.Println("扫描完成 \r\n\t\t共扫描到提交限制分享种子数量:" + strconv.Itoa(setLimitCount) + "个")
}
log.Println("开始等待下一轮检查 等待", int(limitTime), "s后执行")
time.Sleep(time.Second * limitTime)
}
Expand Down

0 comments on commit 0bbcfcb

Please sign in to comment.