|
@@ -278,6 +278,7 @@ func SaveObj(event int, checkAtrr string, data map[string]interface{}, saveredis
|
|
|
href := fmt.Sprint(data["href"])
|
|
|
if len(href) > 5 && saveredis { //有效数据
|
|
|
db := HexToBigIntMod(href) //根据href的哈希值选择Redis的db
|
|
|
+ hashHref := HexText(href)
|
|
|
//增量
|
|
|
isExist, _ := util.ExistRedis("title_repeat_judgement", 0, "url_repeat_"+href)
|
|
|
id := ""
|
|
@@ -292,9 +293,9 @@ func SaveObj(event int, checkAtrr string, data map[string]interface{}, saveredis
|
|
|
util.PutRedis("title_repeat_judgement", 0, "url_repeat_"+href, href, 3600*24*30)
|
|
|
if !flag { //保存服务发送成功
|
|
|
//全量(判断是否已存在防止覆盖id)
|
|
|
- isExist, _ := util.ExistRedis("title_repeat_fulljudgement", db, "url_repeat_"+href)
|
|
|
+ isExist, _ := util.ExistRedis("title_repeat_fulljudgement", db, hashHref)
|
|
|
if !isExist {
|
|
|
- util.PutRedis("title_repeat_fulljudgement", db, "url_repeat_"+href, "lua_"+id, -1)
|
|
|
+ util.PutRedis("title_repeat_fulljudgement", db, hashHref, "lua_"+id, -1)
|
|
|
}
|
|
|
}
|
|
|
}
|