Explorar o código

loadscript方法改动

maxiaoshan %!s(int64=3) %!d(string=hai) anos
pai
achega
20ec5b2461
Modificáronse 3 ficheiros con 5 adicións e 5 borrados
  1. BIN=BIN
      src/res/spidercodes.xlsx
  2. 3 3
      src/spider/front.go
  3. 2 2
      src/spider/spider.go

BIN=BIN
src/res/spidercodes.xlsx


+ 3 - 3
src/spider/front.go

@@ -739,7 +739,7 @@ func (i *Front) GetAllSpider() {
 	sort.Strings(AllspiderCodes)
 	//LoopListPath
 	size_all, size_ok, size_no := 0, 0, 0
-	size_no_index := []string{}
+	//size_no_index := []string{}
 	LoopListPathCodes := []string{}
 	LoopListPath.Range(func(k, v interface{}) bool {
 		size_all++
@@ -749,7 +749,7 @@ func (i *Front) GetAllSpider() {
 			code := info["code"]
 			LoopListPathCodes = append(LoopListPathCodes, code)
 		} else {
-			size_no_index = append(size_no_index, fmt.Sprint(k))
+			//size_no_index = append(size_no_index, fmt.Sprint(k))
 			size_no++
 		}
 		return true
@@ -767,7 +767,7 @@ func (i *Front) GetAllSpider() {
 	row.AddCell().SetValue(size_all)
 	row.AddCell().SetValue(size_ok)
 	row.AddCell().SetValue(size_no)
-	row.AddCell().SetValue(strings.Join(size_no_index, ","))
+	//row.AddCell().SetValue(strings.Join(size_no_index, ","))
 	row.AddCell().SetValue(allspidersLen)
 	row.AddCell().SetValue(spidersLen_ok)
 	//sheet codes

+ 2 - 2
src/spider/spider.go

@@ -71,7 +71,7 @@ type Spider struct {
 	UpperLimit, LowerLimit          int    //正常值上限、下限
 	UserName, UserEmail, UploadTime string //开发者名称,开发者邮箱,脚本上传时间
 	MUserName, MUserEmail           string //维护人,维护人邮箱
-	Index                           int    //数组索引
+	//Index                           int    //数组索引
 	//历史补漏
 	IsHistoricalMend bool //是否是历史补漏爬虫
 	IsMustDownload   bool //是否强制下载
@@ -149,7 +149,7 @@ func (s *Spider) ExecJob(reload bool) {
 			}
 			return true
 		})
-		logger.Debug("index_", s.Index, ",", s.Code, s.Name, "ok,本轮下载量:", s.LastDowncount, ",轮询数据长度:", size_ok, ",废弃数量:", size_no, ",废弃位置:", size_no_index)
+		logger.Debug(s.Code, s.Name, "ok,本轮下载量:", s.LastDowncount, ",轮询数据长度:", size_ok, ",下线数量:", size_no, ",下线爬虫:", size_no_index)
 		s.ExecuteOkTime = time.Now().Unix()
 		util.TimeSleepFunc(5*time.Second, TimeSleepChan)
 		if util.Config.Working == 1 {