Browse Source

no message

Jianghan 5 năm trước cách đây
mục cha
commit
c7b63f4535
1 tập tin đã thay đổi với 4 bổ sung2 xóa
  1. 4 2
      fullproject/src_v1/task.go

+ 4 - 2
fullproject/src_v1/task.go

@@ -76,7 +76,7 @@ func NewPT() *ProjectTask {
 	p := &ProjectTask{
 		InitMinTime: int64(1325347200),
 		name:        "全/增量对象",
-		thread:      4,
+		thread:      Thread,
 		updatePool:  make(chan []map[string]interface{}, 5000),
 		//savePool:    make(chan map[string]interface{}, 2000),
 		wg:        sync.WaitGroup{},
@@ -103,10 +103,12 @@ var sp = make(chan bool, 5)
 
 //初始化全量合并对象
 func init() {
+	util.Debug("task init...")
 	P_QL = NewPT()
 	log.Println(len(P_QL.updatePool))
 	go P_QL.updateAllQueue()
 	go P_QL.clearMem()
+	util.Debug("task init end")
 }
 
 func (p *ProjectTask) updateAllQueue() {
@@ -585,7 +587,7 @@ func (p *ProjectTask) enter(db, coll string, q map[string]interface{}) {
 	}()
 	fields := map[string]interface{} {"area": 1, "city": 1, "district": 1, "comeintime": 1, "publishtime": 1, "bidopentime": 1, "title": 1, "projectname": 1, "href": 1,
 		"projectcode": 1, "buyerclass": 1, "winner": 1, "s_winner": 1, "buyer": 1, "buyerperson": 1, "buyertel": 1, "infoformat": 1, "toptype": 1, "subtype": 1, "spidercode": 1,
-		"site": 1, "topscopeclass": 1, "subscopeclass": 1, "bidamount": 1, "budget": 1, "agency": 1, "package": 1}
+		"site": 1, "topscopeclass": 1, "subscopeclass": 1, "bidamount": 1, "budget": 1, "agency": 1, "package": 1, "jsondata": 1}
 	ms := sess.DB(db).C(coll).Find(q).Select(fields).Sort("publishtime")
 	if Sysconfig["hints"] != nil {
 		ms.Hint(Sysconfig["hints"])