Explorar el Código

更新取值时间范围

wcc hace 1 año
padre
commit
52911feaa6
Se han modificado 2 ficheros con 4 adiciones y 4 borrados
  1. 2 2
      website_columns/config.toml
  2. 2 2
      website_columns/main.go

+ 2 - 2
website_columns/config.toml

@@ -33,13 +33,13 @@
 #    spec = "0 */1 * * * *"    ## 5分钟执行一次
     spec = "0 00 05 * * *"     ## 每天5点执行;执行热门数据标签
     spec2 = "@every 2h"        ## 每2小时,执行一次
-    start = 1680749350         ## 表示 comeintime 大于这个值
+#    start = 1680749350         ## 表示 comeintime 大于这个值
 #    end = 0                    ## 表示comeintime 小于这个值
 #    delete = -30              ## 删除30天之前的数据
     columns = ["招标公告","招标预告","招标结果","招标信用","采购意向","项目分包","企业直采",
         "政府采购","拟在建项目","审批项目","推荐项目","业主委托项目","热门项目","新兴项目",
     "国家级项目","省级项目"]
-    hotnum = 25 ## 每天搜索次数
+    hotnum = 10 ## 每天搜索次数
     hotday = 15 ## 汇总15天的数据
 
 

+ 2 - 2
website_columns/main.go

@@ -78,7 +78,7 @@ func dealBidding() {
 		//默认 取大于 昨天的数据
 		q = map[string]interface{}{
 			"comeintime": map[string]interface{}{
-				"$gt": time.Date(now.Year(), now.Month(), now.Day(), now.Hour()-2, 0, 0, 0, now.Location()).Unix(),
+				"$gt": time.Date(now.Year(), now.Month(), now.Day(), now.Hour()-4, 0, 0, 0, now.Location()).Unix(),
 			},
 		}
 	}
@@ -296,7 +296,7 @@ func dealProject() {
 		//默认 取大于 昨天的数据
 		q = map[string]interface{}{
 			"pici": map[string]interface{}{
-				"$gt": time.Date(now.Year(), now.Month(), now.Day(), now.Hour()-2, 0, 0, 0, now.Location()).Unix(),
+				"$gt": time.Date(now.Year(), now.Month(), now.Day(), now.Hour()-8, 0, 0, 0, now.Location()).Unix(),
 			},
 		}
 	}