|
@@ -386,12 +386,12 @@ func UpdateSpiderByCodeState(code, state string) (bool, error) {
|
|
var err error
|
|
var err error
|
|
if state != "5" && state != "-1" { //脚本下架
|
|
if state != "5" && state != "-1" { //脚本下架
|
|
SpiderHeart.Delete(code) //脚本下架,删除脚本对应心跳
|
|
SpiderHeart.Delete(code) //脚本下架,删除脚本对应心跳
|
|
- Mgo.Update("spider_heart", map[string]interface{}{"code": code}, map[string]interface{}{
|
|
|
|
- "$set": map[string]interface{}{
|
|
|
|
- "del": true,
|
|
|
|
- "updatetime": time.Now().Unix(),
|
|
|
|
- },
|
|
|
|
- }, false, false)
|
|
|
|
|
|
+ // Mgo.Update("spider_heart", map[string]interface{}{"code": code}, map[string]interface{}{
|
|
|
|
+ // "$set": map[string]interface{}{
|
|
|
|
+ // "del": true,
|
|
|
|
+ // "updatetime": time.Now().Unix(),
|
|
|
|
+ // },
|
|
|
|
+ // }, false, false)
|
|
if util.Config.Working == 1 {
|
|
if util.Config.Working == 1 {
|
|
for i, as := range []sync.Map{Allspiders, Allspiders2} {
|
|
for i, as := range []sync.Map{Allspiders, Allspiders2} {
|
|
if i == 1 && util.Config.Modal == 0 { //队列模式原始模式采集Allspiders2无用(7700下架爬虫)
|
|
if i == 1 && util.Config.Modal == 0 { //队列模式原始模式采集Allspiders2无用(7700下架爬虫)
|