| | |
| | | if v, ok := defaultCacheStore.Get(fmt.Sprintf(CurrentTaskCacheKey, channel)); ok { |
| | | return v.(bool) |
| | | } |
| | | _, err := model.NewProceduresSearch(nil).SetDeviceId(conf.Conf.System.DeviceId).SetStatus(model.ProcedureStatusProcessing).SetChannel(channel).First() |
| | | _, err := model.NewProceduresSearch(nil).SetDeviceId(conf.Conf.System.DeviceId).SetStatus(model.ProcedureStatusProcessing).SetChannels([]int32{channel}).First() |
| | | if err == gorm.ErrRecordNotFound { |
| | | defaultCacheStore.Add(fmt.Sprintf(CurrentTaskCacheKey, channel), false) |
| | | return false |