From 777978a2a2ac2232050ba44521f107b85646081b Mon Sep 17 00:00:00 2001
From: yinbangzhong <zhongbangyin@126.com>
Date: 星期五, 14 六月 2024 15:40:45 +0800
Subject: [PATCH] watch preloads file to autoload

---
 main.go |    6 ++++++
 1 files changed, 6 insertions(+), 0 deletions(-)

diff --git a/main.go b/main.go
index a9819f7..cfe0598 100644
--- a/main.go
+++ b/main.go
@@ -10,6 +10,7 @@
 	"speechAnalysis/models"
 	"speechAnalysis/pkg/logx"
 	"speechAnalysis/router"
+	"speechAnalysis/service"
 	"syscall"
 	"time"
 )
@@ -31,6 +32,11 @@
 		return
 	}
 
+	//鐩戞帶棰勫姞杞介煶棰戞枃浠�
+	cxt, cancel := context.WithCancel(context.Background())
+	defer cancel()
+	go service.PreLoad(cxt)
+
 	logx.Infof("server start serve...")
 	server := &http.Server{
 		Addr:         ":" + conf.WebConf.Port,

--
Gitblit v1.8.0