| | |
| | | if err != nil { |
| | | logx.Errorf("SyncTaskStatus get records err:%v", err) |
| | | } |
| | | syncOkIds := make([]uint, 0, len(records)) |
| | | for _, record := range records { |
| | | msg := &common.MsgTaskStatusUpdate{ |
| | | WorkOrderId: record.WorkOrderId, |
| | |
| | | if err != nil { |
| | | logx.Errorf("sync task status send msg error:%v", err.Error()) |
| | | } |
| | | syncOkIds = append(syncOkIds, record.ID) |
| | | } |
| | | if len(syncOkIds) > 0 { |
| | | err = service.NewTaskService().RemoveTaskStatusSync(syncOkIds) |
| | | if err != nil { |
| | | logx.Errorf("sync task status delete sync ok records error:%v", err) |
| | | } |
| | | } |
| | | } |
| | | |