|
@@ -41,6 +41,7 @@ type SupplementSpider struct {
|
|
Success int `bson:"success"`
|
|
Success int `bson:"success"`
|
|
Failed int `bson:"failed"`
|
|
Failed int `bson:"failed"`
|
|
PublishtimeZeroNum int `bson:"ptimezeronum"`
|
|
PublishtimeZeroNum int `bson:"ptimezeronum"`
|
|
|
|
+ EffectiveNum int `bson:"effectivenum"`
|
|
}
|
|
}
|
|
|
|
|
|
func InitSupplement() {
|
|
func InitSupplement() {
|
|
@@ -82,6 +83,8 @@ func SupplementEnd() {
|
|
|
|
|
|
func SupplementDataCount() {
|
|
func SupplementDataCount() {
|
|
logger.Info("补采数据统计开始...")
|
|
logger.Info("补采数据统计开始...")
|
|
|
|
+ timeEnd := GetStrTime(-1)
|
|
|
|
+ timeStart := GetStrTime(-3)
|
|
sess := MgoS.GetMgoConn()
|
|
sess := MgoS.GetMgoConn()
|
|
defer MgoS.DestoryMongoConn(sess)
|
|
defer MgoS.DestoryMongoConn(sess)
|
|
ch := make(chan bool, 5)
|
|
ch := make(chan bool, 5)
|
|
@@ -124,6 +127,8 @@ func SupplementDataCount() {
|
|
}
|
|
}
|
|
if publishtime == "0" || publishtime == "" {
|
|
if publishtime == "0" || publishtime == "" {
|
|
ss.PublishtimeZeroNum++
|
|
ss.PublishtimeZeroNum++
|
|
|
|
+ } else if publishtime >= timeStart && publishtime < timeEnd {
|
|
|
|
+ ss.EffectiveNum++
|
|
}
|
|
}
|
|
}
|
|
}
|
|
lock.Unlock()
|
|
lock.Unlock()
|