2024-07-23 14:48:37 +08:00
|
|
|
package db
|
|
|
|
|
|
|
|
import (
|
|
|
|
"path"
|
|
|
|
|
|
|
|
"github.com/1Panel-dev/1Panel/agent/global"
|
2024-11-28 18:42:40 +08:00
|
|
|
"github.com/1Panel-dev/1Panel/agent/utils/common"
|
2024-07-23 14:48:37 +08:00
|
|
|
)
|
|
|
|
|
|
|
|
func Init() {
|
2024-11-28 18:42:40 +08:00
|
|
|
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")
|
2024-08-14 10:15:55 +08:00
|
|
|
}
|