Browse Source

更新

master
huangjiajun 1 month ago
parent
commit
e72bed4e64
1 changed files with 4 additions and 4 deletions
  1. +4
    -4
      app/svc/svc_data_center_original_data.go

+ 4
- 4
app/svc/svc_data_center_original_data.go View File

@@ -217,10 +217,10 @@ func DataCenterOriginalDataDoing(c *gin.Context, req md.DataCenterDataCenterOrig
return nil return nil
} }
func OriginalDataMoreApplicationDoing(c *gin.Context, req md.DataCenterOriginalDataMoreApplicationDoingReq) error { func OriginalDataMoreApplicationDoing(c *gin.Context, req md.DataCenterOriginalDataMoreApplicationDoingReq) error {
state, _ := cache.GetString(c.GetString("mid") + ":original.wx.ad.data")
if state == "1" {
return e.NewErr(400000, "数据采集中~")
}
//state, _ := cache.GetString(c.GetString("mid") + ":original.wx.ad.data")
//if state == "1" {
// return e.NewErr(400000, "数据采集中~")
//}
// 加锁 防止并发提取 // 加锁 防止并发提取
mutexKey := fmt.Sprintf("%s:DataCenterOriginalDataDoingOriginalDataMoreApplicationDoing", c.GetString("mid")) mutexKey := fmt.Sprintf("%s:DataCenterOriginalDataDoingOriginalDataMoreApplicationDoing", c.GetString("mid"))
withdrawAvailable, err := cache.Do("SET", mutexKey, 1, "EX", 5, "NX") withdrawAvailable, err := cache.Do("SET", mutexKey, 1, "EX", 5, "NX")


Loading…
Cancel
Save