Sfoglia il codice sorgente

crontab clear update orders

abiao 5 anni fa
parent
commit
42d2f8c81b

+ 1 - 3
go/gopath/src/fohow.com/apps/controllers/cron_controller/init.go

@@ -1,7 +1,6 @@
 package cron_controller
 
 import (
-	"fohow.com/apps/models/express_model"
 	"github.com/astaxie/beego"
 	"github.com/astaxie/beego/context"
 
@@ -83,8 +82,7 @@ func exec(name string) {
 	case "send_cent": //补发积分执行一次
 		//go patchCent()
 	case "clear_update_orders": //清理过期物流数据
-		//go patchCent()
-		go express_model.ClearUpdateOrders()
+		go clearUpdateOrders()
 	default:
 		beego.BeeLogger.Error("Didn't get task wity name:[%s]", name)
 	}

+ 10 - 0
go/gopath/src/fohow.com/apps/controllers/cron_controller/update_sold_count.go

@@ -1,6 +1,7 @@
 package cron_controller
 
 import (
+	"fohow.com/apps/models/express_model"
 	"fohow.com/apps/models/order_model"
 	"fohow.com/apps/models/product_model"
 	"github.com/astaxie/beego"
@@ -33,3 +34,12 @@ func updateSoldCount() {
 	}
 
 }
+
+/*
+	清理update_orders 冗余数据
+*/
+func clearUpdateOrders() {
+
+	express_model.ClearUpdateOrders()
+
+}