maxiaoshan hace 3 años
padre
commit
7f6208c1d8
Se han modificado 2 ficheros con 6 adiciones y 0 borrados
  1. 3 0
      src/downloadnum.go
  2. 3 0
      src/task.go

+ 3 - 0
src/downloadnum.go

@@ -97,6 +97,9 @@ func GetDownloadNumber() {
 					min := dr * avFlush
 					max := ur * avFlush
 					numerr := float64(num) >= min && float64(num) <= max //超出范围
+					if avFlush == 0 {                                    //平均值0,下载量0,建异常任务
+						numerr = false
+					}
 					update = append(update, map[string]interface{}{
 						"$set": map[string]interface{}{
 							"timeAndNum":      timeAndNum,                   //时间下载量集合

+ 3 - 0
src/task.go

@@ -78,6 +78,9 @@ func CloseTask() {
 		"l_complete": map[string]interface{}{
 			"$lt": unix_time + 86400,
 		},
+		"s_type": map[string]interface{}{
+			"$ne": "7",
+		},
 	}
 	logger.Debug("query:", query)
 	set := map[string]interface{}{