fix
zhangqian
2023-10-19 cab6eea89a0d82710369604ecb51f1cdb122e433
service/cache_store.go
@@ -1,11 +1,12 @@
package service
import (
   "apsClient/conf"
   "apsClient/constvar"
   "apsClient/model"
   "fmt"
   "github.com/jinzhu/gorm"
   "github.com/spf13/cast"
   "gorm.io/gorm"
   "sync"
   "time"
)
@@ -91,7 +92,7 @@
   if v, ok := defaultCacheStore.Get(fmt.Sprintf(CurrentTaskCacheKey, channel)); ok {
      return v.(bool)
   }
   _, err := model.NewProceduresSearch(nil).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