feat: add openconnect

This commit is contained in:
duorameng
2026-06-25 20:06:38 +08:00
parent fac1582fe0
commit 90f06de298
49 changed files with 3854 additions and 969 deletions
+4 -8
View File
@@ -2,13 +2,13 @@ package router
import (
// "fmt"
"time"
// "github.com/engigu/baihu-panel/internal/constant"
"github.com/engigu/baihu-panel/internal/eventbus"
// "github.com/engigu/baihu-panel/internal/logger"
// "github.com/engigu/baihu-panel/internal/models"
"github.com/engigu/baihu-panel/internal/services"
"github.com/engigu/baihu-panel/internal/executor"
)
func setupEventHandlers(subscribers ...eventbus.Subscriber) {
@@ -21,12 +21,8 @@ func setupEventHandlers(subscribers ...eventbus.Subscriber) {
}
func startAppLogCleanup(appLogSvc *services.AppLogService) {
// 初始化时执行一次清理
appLogSvc.CleanUp()
// 定期清理(每隔1小时执行一次巡检)
ticker := time.NewTicker(1 * time.Hour)
for range ticker.C {
// 注册到内部系统定时器(并立即执行一次
executor.GetSysCron().AddJobWithRun("@every 1h", func() {
appLogSvc.CleanUp()
}
})
}