正在显示
1 个修改的文件
包含
3 行增加
和
3 行删除
@@ -31,9 +31,9 @@ func (rs *NodeTaskService) SendEvaluationNode() error { | @@ -31,9 +31,9 @@ func (rs *NodeTaskService) SendEvaluationNode() error { | ||
31 | defer func() { | 31 | defer func() { |
32 | transactionContext.RollbackTransaction() | 32 | transactionContext.RollbackTransaction() |
33 | 33 | ||
34 | - // 异常捕获 | ||
35 | - recError := recover() | ||
36 | - log.Logger.Error(application.ThrowError(application.BUSINESS_ERROR, fmt.Sprintf("定时发送评估任务异常:%s", recError)).Error()) | 34 | + if err := recover(); err != nil { |
35 | + log.Logger.Error(application.ThrowError(application.BUSINESS_ERROR, fmt.Sprintf("定时发送评估任务异常:%s", err)).Error()) | ||
36 | + } | ||
37 | }() | 37 | }() |
38 | taskRepository := factory.CreateNodeTaskRepository(map[string]interface{}{"transactionContext": transactionContext}) | 38 | taskRepository := factory.CreateNodeTaskRepository(map[string]interface{}{"transactionContext": transactionContext}) |
39 | tasks, err := taskRepository.Find(map[string]interface{}{"now": time.Now().Local()}) | 39 | tasks, err := taskRepository.Find(map[string]interface{}{"now": time.Now().Local()}) |
-
请 注册 或 登录 后发表评论