Pārlūkot izejas kodu

发送保存服务后返回信息id存入data_bak

maxiaoshan 2 gadi atpakaļ
vecāks
revīzija
b77381f5bd
2 mainītis faili ar 127 papildinājumiem un 1 dzēšanām
  1. 123 0
      src/logs/spider.log
  2. 4 1
      src/spider/msgservice.go

+ 123 - 0
src/logs/spider.log

@@ -9052,3 +9052,126 @@ stack traceback:
 2022/08/20 09:50:08 spider.go:180: debug  tj_tjszfcgzxxyghpt_wsjj_cgjg_bu 天津市政府采购中心协议供货平台 频率: 30 , 150
 2022/08/20 09:50:08 handler.go:138: info  高性能模式:LUA加载完成
 2022/08/20 09:50:08 handler.go:144: info  总共加载脚本数: 1
+2022/08/23 18:15:56 main.go:140: debug  7100
+2022/08/23 18:15:56 spider.go:1091: info  Detail Download All Thread: 0
+2022/08/23 18:15:56 handler.go:407: info  节点 7500 脚本文件爬虫数 0
+2022/08/23 18:15:56 handler.go:407: info  节点 7500 脚本文件爬虫数 0
+2022/08/23 18:15:56 handler.go:138: info  高性能模式:LUA加载完成
+2022/08/23 18:15:56 handler.go:144: info  总共加载脚本数: 1
+2022/08/23 18:15:56 spider.go:766: info  +++++++++++++++++++Download Detail+++++++++++++++++++
+2022/08/23 18:15:56 spider.go:779: info  Running Code: a_scntfzgfyxgs_zbgg Stop: false
+2022/08/23 18:15:56 spider.go:845: info  Thread Info:	Code: a_scntfzgfyxgs_zbgg 	count: 1 	thread num: 0
+2022/08/23 18:16:19 main.go:140: debug  7100
+2022/08/23 18:16:19 spider.go:1091: info  Detail Download All Thread: 0
+2022/08/23 18:16:19 handler.go:407: info  节点 7500 脚本文件爬虫数 0
+2022/08/23 18:16:19 handler.go:407: info  节点 7500 脚本文件爬虫数 0
+2022/08/23 18:16:19 handler.go:138: info  高性能模式:LUA加载完成
+2022/08/23 18:16:19 handler.go:144: info  总共加载脚本数: 1
+2022/08/23 18:16:19 spider.go:766: info  +++++++++++++++++++Download Detail+++++++++++++++++++
+2022/08/23 18:16:19 spider.go:779: info  Running Code: a_scntfzgfyxgs_zbgg Stop: false
+2022/08/23 18:16:19 spider.go:845: info  Thread Info:	Code: a_scntfzgfyxgs_zbgg 	count: 1 	thread num: 0
+2022/08/23 18:16:36 handler.go:1286: error  send to editor:  Post "http://127.0.0.1:6011/spider/infos": dial tcp 127.0.0.1:6011: connectex: No connection could be made because the target machine actively refused it.
+2022/08/23 18:16:49 handler.go:1318: info  更新心跳个数: 1
+2022/08/23 18:17:19 spider.go:1091: info  Detail Download All Thread: 1
+2022/08/23 18:18:19 spider.go:1091: info  Detail Download All Thread: 1
+2022/08/23 18:19:26 main.go:140: debug  7100
+2022/08/23 18:19:26 spider.go:1091: info  Detail Download All Thread: 0
+2022/08/23 18:19:26 handler.go:407: info  节点 7500 脚本文件爬虫数 0
+2022/08/23 18:19:26 handler.go:407: info  节点 7500 脚本文件爬虫数 0
+2022/08/23 18:19:27 handler.go:138: info  高性能模式:LUA加载完成
+2022/08/23 18:19:27 spider.go:766: info  +++++++++++++++++++Download Detail+++++++++++++++++++
+2022/08/23 18:19:27 handler.go:144: info  总共加载脚本数: 1
+2022/08/23 18:19:27 spider.go:779: info  Running Code: a_scntfzgfyxgs_zbgg Stop: false
+2022/08/23 18:19:27 spider.go:845: info  Thread Info:	Code: a_scntfzgfyxgs_zbgg 	count: 1 	thread num: 0
+2022/08/23 18:19:43 handler.go:1286: error  send to editor:  Post "http://127.0.0.1:6011/spider/infos": dial tcp 127.0.0.1:6011: connectex: No connection could be made because the target machine actively refused it.
+2022/08/23 18:19:56 handler.go:1318: info  更新心跳个数: 1
+2022/08/23 18:29:25 spider.go:1091: info  Detail Download All Thread: 0
+2022/08/23 18:29:25 main.go:140: debug  7100
+2022/08/23 18:29:25 handler.go:407: info  节点 7500 脚本文件爬虫数 0
+2022/08/23 18:29:25 handler.go:407: info  节点 7500 脚本文件爬虫数 0
+2022/08/23 18:29:25 handler.go:138: info  高性能模式:LUA加载完成
+2022/08/23 18:29:25 handler.go:144: info  总共加载脚本数: 0
+2022/08/23 18:29:25 spider.go:766: info  +++++++++++++++++++Download Detail+++++++++++++++++++
+2022/08/23 18:29:36 spider.go:1091: info  Detail Download All Thread: 0
+2022/08/23 18:29:36 main.go:140: debug  7100
+2022/08/23 18:29:36 handler.go:407: info  节点 7110 脚本文件爬虫数 0
+2022/08/23 18:29:36 handler.go:407: info  节点 7110 脚本文件爬虫数 0
+2022/08/23 18:29:36 handler.go:138: info  高性能模式:LUA加载完成
+2022/08/23 18:29:36 handler.go:144: info  总共加载脚本数: 1
+2022/08/23 18:29:36 spider.go:766: info  +++++++++++++++++++Download Detail+++++++++++++++++++
+2022/08/23 18:29:36 spider.go:779: info  Running Code: a_zghxzbtbdzjypt_cggg Stop: false
+2022/08/23 18:29:36 spider.go:845: info  Thread Info:	Code: a_zghxzbtbdzjypt_cggg 	count: 1 	thread num: 0
+2022/08/23 18:30:06 handler.go:1318: info  更新心跳个数: 1
+2022/08/23 18:30:36 spider.go:1091: info  Detail Download All Thread: 1
+2022/08/23 18:30:52 main.go:140: debug  7100
+2022/08/23 18:30:52 spider.go:1091: info  Detail Download All Thread: 0
+2022/08/23 18:30:52 handler.go:407: info  节点 7110 脚本文件爬虫数 0
+2022/08/23 18:30:52 handler.go:407: info  节点 7110 脚本文件爬虫数 0
+2022/08/23 18:30:52 spider.go:766: info  +++++++++++++++++++Download Detail+++++++++++++++++++
+2022/08/23 18:30:52 spider.go:779: info  Running Code: a_zghxzbtbdzjypt_cggg Stop: false
+2022/08/23 18:30:52 handler.go:138: info  高性能模式:LUA加载完成
+2022/08/23 18:30:52 handler.go:144: info  总共加载脚本数: 1
+2022/08/23 18:30:52 spider.go:845: info  Thread Info:	Code: a_zghxzbtbdzjypt_cggg 	count: 1 	thread num: 0
+2022/08/23 18:32:59 main.go:141: debug  7100
+2022/08/23 18:32:59 spider.go:1091: info  Detail Download All Thread: 0
+2022/08/23 18:32:59 handler.go:407: info  节点 7110 脚本文件爬虫数 0
+2022/08/23 18:32:59 handler.go:407: info  节点 7110 脚本文件爬虫数 0
+2022/08/23 18:33:00 handler.go:138: info  高性能模式:LUA加载完成
+2022/08/23 18:33:00 handler.go:144: info  总共加载脚本数: 1
+2022/08/23 18:33:00 spider.go:766: info  +++++++++++++++++++Download Detail+++++++++++++++++++
+2022/08/23 18:33:00 spider.go:779: info  Running Code: a_zghxzbtbdzjypt_cggg Stop: false
+2022/08/23 18:33:00 spider.go:845: info  Thread Info:	Code: a_zghxzbtbdzjypt_cggg 	count: 1 	thread num: 0
+2022/08/23 18:33:15 main.go:140: debug  7100
+2022/08/23 18:33:15 spider.go:1091: info  Detail Download All Thread: 0
+2022/08/23 18:33:15 handler.go:407: info  节点 7110 脚本文件爬虫数 0
+2022/08/23 18:33:15 handler.go:407: info  节点 7110 脚本文件爬虫数 0
+2022/08/23 18:33:15 handler.go:138: info  高性能模式:LUA加载完成
+2022/08/23 18:33:15 handler.go:144: info  总共加载脚本数: 1
+2022/08/23 18:33:15 spider.go:766: info  +++++++++++++++++++Download Detail+++++++++++++++++++
+2022/08/23 18:33:15 spider.go:779: info  Running Code: a_zghxzbtbdzjypt_cggg Stop: false
+2022/08/23 18:33:15 spider.go:845: info  Thread Info:	Code: a_zghxzbtbdzjypt_cggg 	count: 1 	thread num: 0
+2022/08/23 18:33:46 handler.go:1318: info  更新心跳个数: 1
+2022/08/23 18:36:49 main.go:140: debug  7100
+2022/08/23 18:36:49 spider.go:1091: info  Detail Download All Thread: 0
+2022/08/23 18:36:49 handler.go:407: info  节点 7110 脚本文件爬虫数 0
+2022/08/23 18:36:49 handler.go:407: info  节点 7110 脚本文件爬虫数 0
+2022/08/23 18:36:49 handler.go:138: info  高性能模式:LUA加载完成
+2022/08/23 18:36:49 handler.go:144: info  总共加载脚本数: 1
+2022/08/23 18:36:49 spider.go:766: info  +++++++++++++++++++Download Detail+++++++++++++++++++
+2022/08/23 18:36:49 spider.go:779: info  Running Code: a_zghxzbtbdzjypt_cggg Stop: false
+2022/08/23 18:36:49 spider.go:845: info  Thread Info:	Code: a_zghxzbtbdzjypt_cggg 	count: 1 	thread num: 0
+2022/08/23 18:41:49 spider.go:1090: info  Detail Download All Thread: 0
+2022/08/23 18:41:49 main.go:140: debug  7100
+2022/08/23 18:41:49 handler.go:407: info  节点 7100 脚本文件爬虫数 0
+2022/08/23 18:41:49 handler.go:407: info  节点 7100 脚本文件爬虫数 0
+2022/08/23 18:42:20 main.go:140: debug  7100
+2022/08/23 18:42:20 spider.go:1091: info  Detail Download All Thread: 0
+2022/08/23 18:42:20 handler.go:407: info  节点 7100 脚本文件爬虫数 0
+2022/08/23 18:42:20 handler.go:407: info  节点 7100 脚本文件爬虫数 0
+2022/08/23 18:42:20 handler.go:138: info  高性能模式:LUA加载完成
+2022/08/23 18:42:20 handler.go:144: info  总共加载脚本数: 0
+2022/08/23 18:42:20 spider.go:766: info  +++++++++++++++++++Download Detail+++++++++++++++++++
+2022/08/23 18:42:29 spider.go:1091: info  Detail Download All Thread: 0
+2022/08/23 18:42:29 main.go:140: debug  7100
+2022/08/23 18:42:29 handler.go:407: info  节点 7100 脚本文件爬虫数 0
+2022/08/23 18:42:29 handler.go:407: info  节点 7100 脚本文件爬虫数 0
+2022/08/23 18:42:29 handler.go:138: info  高性能模式:LUA加载完成
+2022/08/23 18:42:29 handler.go:144: info  总共加载脚本数: 0
+2022/08/23 18:42:29 spider.go:766: info  +++++++++++++++++++Download Detail+++++++++++++++++++
+2022/08/23 18:42:34 spider.go:1091: info  Detail Download All Thread: 0
+2022/08/23 18:42:34 main.go:140: debug  7100
+2022/08/23 18:42:34 handler.go:407: info  节点 7100 脚本文件爬虫数 0
+2022/08/23 18:42:34 handler.go:407: info  节点 7100 脚本文件爬虫数 0
+2022/08/23 18:42:34 handler.go:138: info  高性能模式:LUA加载完成
+2022/08/23 18:42:34 handler.go:144: info  总共加载脚本数: 0
+2022/08/23 18:42:34 spider.go:766: info  +++++++++++++++++++Download Detail+++++++++++++++++++
+2022/08/23 18:42:41 main.go:140: debug  7100
+2022/08/23 18:42:41 spider.go:1091: info  Detail Download All Thread: 0
+2022/08/23 18:42:41 handler.go:407: info  节点 7110 脚本文件爬虫数 0
+2022/08/23 18:42:41 handler.go:407: info  节点 7110 脚本文件爬虫数 0
+2022/08/23 18:42:42 handler.go:138: info  高性能模式:LUA加载完成
+2022/08/23 18:42:42 spider.go:766: info  +++++++++++++++++++Download Detail+++++++++++++++++++
+2022/08/23 18:42:42 handler.go:144: info  总共加载脚本数: 1
+2022/08/23 18:42:42 spider.go:779: info  Running Code: a_zghxzbtbdzjypt_cggg Stop: false
+2022/08/23 18:42:42 spider.go:845: info  Thread Info:	Code: a_zghxzbtbdzjypt_cggg 	count: 1 	thread num: 0
+2022/08/23 18:43:18 handler.go:1318: info  更新心跳个数: 1

+ 4 - 1
src/spider/msgservice.go

@@ -259,9 +259,11 @@ func SaveObj(event int, checkAtrr string, data map[string]interface{}, saveredis
 		Msclient.WriteObj("", "", mu.SERVICE_SPIDER_ECPS, mu.SENDTO_TYPE_ALL_RECIVER, data)
 	default:
 		flag := true
+		biddingId := ""
 		for i := 1; i < 6; i++ {
 			bs, err := Msclient.Call("", mu.UUID(8), event, mu.SENDTO_TYPE_ALL_RECIVER, tmp, 30)
-			if string(bs) != "" && err == nil {
+			biddingId = string(bs)
+			if biddingId != "" && err == nil {
 				flag = false
 				break
 			}
@@ -279,6 +281,7 @@ func SaveObj(event int, checkAtrr string, data map[string]interface{}, saveredis
 			hashHref := HexText(href)
 			isExists := util.RedisClusterExists(hashHref)
 			data["redisexists"] = isExists
+			data["biddingid"] = biddingId
 			mgu.Save("data_bak", "spider", "spider", data)
 			if !isExists {
 				util.RedisClusterSet(hashHref, "", -1)