| | |
| | | return taskResponse.Tasks[i].Channel < taskResponse.Tasks[i].Channel |
| | | }) |
| | | |
| | | nowTs := time.Now().Unix() |
| | | flagMap := make(map[int32]struct{}, 0) |
| | | for _, task := range taskResponse.Tasks { |
| | | if task.Procedure.Status != model.ProcedureStatusWaitProcess { |
| | | continue |
| | | } |
| | | if _, ok := flagMap[task.Channel]; !ok && !service.TaskFlagGet(conf.Conf.CurrentDeviceID, task.Channel) && task.Procedure.StartTime <= nowTs { |
| | | if _, ok := flagMap[task.Channel]; !ok && !service.TaskFlagGet(conf.Conf.CurrentDeviceID, task.Channel) { |
| | | task.CanStarted = true |
| | | flagMap[task.Channel] = struct{}{} |
| | | } |
| | |
| | | return |
| | | } |
| | | |
| | | nowTs := time.Now().Unix() |
| | | flagMap := make(map[int32]struct{}, 0) |
| | | for _, task := range taskResponse.Tasks { |
| | | if _, ok := flagMap[task.Channel]; !ok && !service.TaskFlagGet(conf.Conf.CurrentDeviceID, task.Channel) && task.Procedure.StartTime <= nowTs { |
| | | if _, ok := flagMap[task.Channel]; !ok && !service.TaskFlagGet(conf.Conf.CurrentDeviceID, task.Channel) { |
| | | task.CanStarted = true |
| | | flagMap[task.Channel] = struct{}{} |
| | | } |