|
@@ -183,9 +183,9 @@ var (
|
|
|
func StartTask() {
|
|
|
InitInfo() //初始化时间
|
|
|
logger.Debug(StartTime, EndTime, Publishtime)
|
|
|
- GetCodeBaseInfo() //初始化爬虫基本信息
|
|
|
- GetBiddingCount() //统计bidding表爬虫采集量
|
|
|
- GetBiddingFileData() //统计bidding_file附件大小为3.7 KB的信息
|
|
|
+ GetCodeBaseInfo() //初始化爬虫基本信息
|
|
|
+ GetBiddingCount() //统计bidding表爬虫采集量
|
|
|
+ //GetBiddingFileData() //统计bidding_file附件大小为3.7 KB的信息
|
|
|
GetCodeHeart() //初始化爬虫心跳信息
|
|
|
GetSpiderHighListDownloadNum() //统计spider_highlistdata爬虫列表页下载量、下载失败量、未下载量
|
|
|
GetSpiderListDownloadNum() //统计spider_listdata爬虫列表页下载量、下载失败量、未下载量
|
|
@@ -1072,33 +1072,34 @@ func GetSpiderWarnErrData() {
|
|
|
if level == 2 {
|
|
|
if infoText == "Field Value Not Contains Chinese" { //title、detail不含中文(数据分析处理每日异常数据)
|
|
|
stype = "text"
|
|
|
- } else if infoText == "Publishtime Is Less Than Zero" { //发布时间小于0
|
|
|
+ } else if infoText == "Publishtime Is Error" { //发布时间小于0
|
|
|
stype = "publishtime"
|
|
|
} else if infoText == "Field Value Contains Random Code" { //title、detail含乱码
|
|
|
stype = "text"
|
|
|
}
|
|
|
} else if level == 1 {
|
|
|
- if infoText == "Attachment Upload Failed" { //附件异常信息
|
|
|
- flag := false
|
|
|
- if data, ok := tmp["data"].(map[string]interface{}); ok {
|
|
|
- if projectinfo, ok := data["projectinfo"].(map[string]interface{}); ok {
|
|
|
- if attachments, ok := projectinfo["attachments"].(map[string]interface{}); ok {
|
|
|
- for _, dataInfo := range attachments {
|
|
|
- if d, ok := dataInfo.(map[string]interface{}); ok {
|
|
|
- org_url := qu.ObjToString(d["org_url"])
|
|
|
- if strings.HasSuffix(org_url, "javascript:void(0)") {
|
|
|
- flag = true
|
|
|
- break
|
|
|
- }
|
|
|
- }
|
|
|
- }
|
|
|
- }
|
|
|
- }
|
|
|
- }
|
|
|
- if flag { //列入下载异常任务类型
|
|
|
- infoText = "File Err" //infoText改为File Err,附件异常
|
|
|
- stype = "annex"
|
|
|
- }
|
|
|
+ if infoText == "File Size Or Url Error" { //附件异常信息
|
|
|
+ stype = "annex"
|
|
|
+ //flag := false
|
|
|
+ //if data, ok := tmp["data"].(map[string]interface{}); ok {
|
|
|
+ // if projectinfo, ok := data["projectinfo"].(map[string]interface{}); ok {
|
|
|
+ // if attachments, ok := projectinfo["attachments"].(map[string]interface{}); ok {
|
|
|
+ // for _, dataInfo := range attachments {
|
|
|
+ // if d, ok := dataInfo.(map[string]interface{}); ok {
|
|
|
+ // org_url := qu.ObjToString(d["org_url"])
|
|
|
+ // if strings.HasSuffix(org_url, "javascript:void(0)") {
|
|
|
+ // flag = true
|
|
|
+ // break
|
|
|
+ // }
|
|
|
+ // }
|
|
|
+ // }
|
|
|
+ // }
|
|
|
+ // }
|
|
|
+ //}
|
|
|
+ //if flag { //列入下载异常任务类型
|
|
|
+ // infoText = "File Err" //infoText改为File Err,附件异常
|
|
|
+ // stype = "annex"
|
|
|
+ //}
|
|
|
} else if infoText == "Publishtime Is Zero" { //发布时间为0
|
|
|
stype = "publishtime"
|
|
|
}
|