db reconnect

This commit is contained in:
2026-01-23 17:15:45 +00:00
parent 895849376e
commit 7f6262b470
7 changed files with 130 additions and 49 deletions
+3 -3
View File
@@ -5,7 +5,7 @@ import (
"os"
"strings"
"gitea.futuresens.co.uk/futuresens/hardlink/handlers"
"gitea.futuresens.co.uk/futuresens/hardlink/errorhandlers"
log "github.com/sirupsen/logrus"
yaml "gopkg.in/yaml.v3"
)
@@ -49,7 +49,7 @@ func ReadHardlinkConfig() ConfigRec {
if cfg.LockType == "" {
err = fmt.Errorf("LockType is required in %s", configName)
handlers.FatalError(err)
errorhandlers.FatalError(err)
}
cfg.LockType = strings.ToLower(cfg.LockType)
@@ -81,7 +81,7 @@ func ReadPreauthReleaserConfig() ConfigRec {
if cfg.Dbport <= 0 || cfg.Dbuser == "" || cfg.Dbname == "" || cfg.Dbpassword == "" {
err = fmt.Errorf("Database config (dbport, dbuser, dbname, dbpassword) are required in %s", configName)
handlers.FatalError(err)
errorhandlers.FatalError(err)
}
if cfg.LogDir == "" {