gomod引用
This commit is contained in:
13
main.go
13
main.go
@@ -2,9 +2,6 @@ package main
|
||||
|
||||
import (
|
||||
"cid/controller"
|
||||
"cid/service"
|
||||
"fmt"
|
||||
"time"
|
||||
|
||||
"gitee.com/red-future---jilin-g/common/http"
|
||||
"gitee.com/red-future---jilin-g/common/jaeger"
|
||||
@@ -19,22 +16,12 @@ func main() {
|
||||
ctx := context.Background()
|
||||
defer jaeger.ShutDown(ctx)
|
||||
|
||||
// 启动统计报表定时任务调度器
|
||||
go func() {
|
||||
time.Sleep(5 * time.Second) // 等待数据库连接初始化完成
|
||||
if err := service.StatReportSchedulerInstance.StartScheduler(ctx); err != nil {
|
||||
fmt.Printf("启动统计报表定时任务失败: %v\n", err)
|
||||
}
|
||||
}()
|
||||
|
||||
http.RouteRegister([]interface{}{
|
||||
controller.Advertisement,
|
||||
controller.Advertiser,
|
||||
controller.AdPosition,
|
||||
controller.AdStatistics,
|
||||
controller.RateLimit,
|
||||
controller.Application,
|
||||
controller.StatReport,
|
||||
})
|
||||
select {}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user