完成基本的系统监控类库
This commit is contained in:
@@ -12,11 +12,13 @@ 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"
|
||||
"sun-panel/models"
|
||||
"sun-panel/structs"
|
||||
"time"
|
||||
|
||||
"log"
|
||||
|
||||
@@ -88,6 +90,8 @@ 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)
|
||||
|
||||
return nil
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user