增加获取各项监控的单独api

This commit is contained in:
Sun
2024-01-04 12:08:39 +08:00
parent d3e3cf5d58
commit baf64a9272
7 changed files with 102 additions and 5 deletions
+1 -3
View File
@@ -12,7 +12,6 @@ import (
"sun-panel/initialize/other"
"sun-panel/initialize/redis"
"sun-panel/initialize/runlog"
"sun-panel/initialize/systemMonitor"
"sun-panel/initialize/systemSettingCache"
"sun-panel/initialize/userToken"
"sun-panel/lib/cmn"
@@ -90,8 +89,7 @@ func InitApp() error {
// 其他的初始化
global.VerifyCodeCachePool = other.InitVerifyCodeCachePool()
global.SystemSetting = systemSettingCache.InItSystemSettingCache()
global.SystemMonitor = global.NewCache[global.ModelSystemMonitor](5*time.Hour, -1, "systemMonitorCache")
systemMonitor.Start(global.SystemMonitor, 3*time.Second)
global.SystemMonitor = global.NewCache[interface{}](5*time.Hour, -1, "systemMonitorCache")
return nil
}