1
0
mirror of https://github.com/1Panel-dev/1Panel.git synced 2025-01-21 09:19:16 +08:00

15 lines
446 B
Go
Raw Normal View History

2024-07-23 14:48:37 +08:00
package db
import (
"path"
"github.com/1Panel-dev/1Panel/agent/global"
"github.com/1Panel-dev/1Panel/agent/utils/common"
2024-07-23 14:48:37 +08:00
)
func Init() {
global.DB = common.LoadDBConnByPath(path.Join(global.CONF.System.DbPath, "agent.db"), "agent")
global.TaskDB = common.LoadDBConnByPath(path.Join(global.CONF.System.DbPath, "task.db"), "task")
global.MonitorDB = common.LoadDBConnByPath(path.Join(global.CONF.System.DbPath, "monitor.db"), "monitor")
}