Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion agent/init/db/db.go
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
package db

import (
"os"
"path"

"github.com/1Panel-dev/1Panel/agent/global"
Expand All @@ -14,7 +15,7 @@
global.GPUMonitorDB = common.LoadDBConnByPath(path.Join(global.Dir.DbDir, "gpu_monitor.db"), "gpu_monitor")
global.AlertDB = common.LoadDBConnByPath(path.Join(global.Dir.DbDir, "alert.db"), "alert")

if global.IsMaster {
if _, err := os.Stat("/usr/bin/1panel-core"); err == nil {

Check failure on line 18 in agent/init/db/db.go

View check run for this annotation

SonarQubeCloud / SonarCloud Code Analysis

Check this error or remove the variable if the error can be safely ignored.

See more on https://sonarcloud.io/project/issues?id=1Panel-dev_1Panel&issues=AZrnVcPu82jdGIUccqqb&open=AZrnVcPu82jdGIUccqqb&pullRequest=11175
global.CoreDB = common.LoadDBConnByPath(path.Join(global.Dir.DbDir, "core.db"), "core")
}
}
Loading