作者 郑周

提交项目优化

@@ -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()})