关闭do方法异常捕获

This commit is contained in:
johlanse 2022-10-26 20:32:26 +08:00
parent c9e12446b5
commit 39fff30d98
1 changed files with 2 additions and 7 deletions

View File

@ -169,13 +169,7 @@ func main() {
if config.Cron != "" {
go func() {
defer func() {
err := recover()
if err != nil {
log.Errorln("定时任务执行出现问题")
log.Errorln(err)
}
}()
log.Infoln("已采用定时执行模式")
c := cron.New()
@ -237,6 +231,7 @@ func do(m string) {
getPush("", "flush", "学习强国助手已上线")
var user *model.User
log.Infoln(user.Nick)
users, _ := model.Query()
study := func(core2 *lib.Core, u *model.User) {
defer func() {