|
@@ -67,6 +67,12 @@ func biddingTask(mapInfo map[string]interface{}) {
|
|
|
}
|
|
|
ch <- true
|
|
|
wg.Add(1)
|
|
|
+ // 创建一个新的map用于goroutine,避免重用
|
|
|
+ docCopy := make(map[string]interface{})
|
|
|
+ for k, v := range tmp {
|
|
|
+ docCopy[k] = v
|
|
|
+ }
|
|
|
+
|
|
|
go func(tmp map[string]interface{}) {
|
|
|
defer func() {
|
|
|
<-ch
|
|
@@ -159,7 +165,7 @@ func biddingTask(mapInfo map[string]interface{}) {
|
|
|
go UdpMethod(mongodb.BsonIdToSId(newTmp["_id"]))
|
|
|
}
|
|
|
}
|
|
|
- }(tmp)
|
|
|
+ }(docCopy)
|
|
|
tmp = map[string]interface{}{}
|
|
|
}
|
|
|
wg.Wait()
|
|
@@ -171,9 +177,9 @@ func biddingTask(mapInfo map[string]interface{}) {
|
|
|
"lteid": bson.M{"$lte": util.ObjToString(mapInfo["lteid"])}}
|
|
|
|
|
|
if config.Conf.Env.Ai {
|
|
|
- MgoBOld.Update("bidding_processing_ids", uq, bson.M{"$set": bson.M{"dataprocess_ai": 7, "updatetime": time.Now().Unix(), "index_num": index}}, false, true)
|
|
|
+ MgoBOld.Update("bidding_processing_ids", uq, bson.M{"$set": bson.M{"dataprocess_ai": 8, "updatetime": time.Now().Unix(), "index_num": index}}, false, true)
|
|
|
} else {
|
|
|
- MgoB.Update("bidding_processing_ids", uq, bson.M{"$set": bson.M{"dataprocess": 8, "updatetime": time.Now().Unix(), "index_num": index}}, false, true)
|
|
|
+ MgoB.Update("bidding_processing_ids", uq, bson.M{"$set": bson.M{"dataprocess": 9, "updatetime": time.Now().Unix(), "index_num": index}}, false, true)
|
|
|
}
|
|
|
}
|
|
|
|