|
@@ -8,6 +8,7 @@ import (
|
|
"io/ioutil"
|
|
"io/ioutil"
|
|
"mime/multipart"
|
|
"mime/multipart"
|
|
qu "qfw/util"
|
|
qu "qfw/util"
|
|
|
|
+ "spider"
|
|
. "spiderutil"
|
|
. "spiderutil"
|
|
"strings"
|
|
"strings"
|
|
. "task"
|
|
. "task"
|
|
@@ -212,12 +213,21 @@ func (f *Front) LuaDataSend() {
|
|
}
|
|
}
|
|
if mustFiledNum > 0 {
|
|
if mustFiledNum > 0 {
|
|
flag, bidid, bidcoll := SaveObj(4002, "title", result)
|
|
flag, bidid, bidcoll := SaveObj(4002, "title", result)
|
|
- logger.Info(bid, flag, bidid, bidcoll)
|
|
|
|
|
|
+ logger.Info(bid, " ", flag, " ", bidid, " ", bidcoll)
|
|
update["sendflag"] = flag
|
|
update["sendflag"] = flag
|
|
update["biddingid"] = bidid
|
|
update["biddingid"] = bidid
|
|
update["biddingcoll"] = bidcoll
|
|
update["biddingcoll"] = bidcoll
|
|
TagToSpiderWarnErr(stype, id, reasons, update) //spider_warn_err日志
|
|
TagToSpiderWarnErr(stype, id, reasons, update) //spider_warn_err日志
|
|
- success = true
|
|
|
|
|
|
+ if flag == "true" {
|
|
|
|
+ success = true
|
|
|
|
+ if bidcoll != "" && bidid != "" {
|
|
|
|
+ msg = "保存成功;数据所在表:" + bidcoll + ";数据ID:" + bidid
|
|
|
|
+ } else {
|
|
|
|
+ msg = "推送成功,但数据存在异常或被判重!"
|
|
|
|
+ hashHref := spider.HexText(qu.ObjToString(data["href"])) //推送的异常数据放回全量redis
|
|
|
|
+ RedisClusterSet(hashHref, "", -1)
|
|
|
|
+ }
|
|
|
|
+ }
|
|
} else {
|
|
} else {
|
|
msg = "推送失败,无有效字段"
|
|
msg = "推送失败,无有效字段"
|
|
}
|
|
}
|