mirror of
https://github.com/grafana/grafana.git
synced 2025-02-25 18:55:37 -06:00
Initial Baby Step to refactoring settings from global vars to instance (#11777)
* wip: start on refactoring settings * settings: progress on settings refactor * refactor: progress on settings refactoring * fix: fixed failing test * settings: moved smtp settings from global to instance
This commit is contained in:
@@ -168,7 +168,7 @@ func getEngine() (*xorm.Engine, error) {
|
||||
engine.SetMaxOpenConns(DbCfg.MaxOpenConn)
|
||||
engine.SetMaxIdleConns(DbCfg.MaxIdleConn)
|
||||
engine.SetConnMaxLifetime(time.Second * time.Duration(DbCfg.ConnMaxLifetime))
|
||||
debugSql := setting.Cfg.Section("database").Key("log_queries").MustBool(false)
|
||||
debugSql := setting.Raw.Section("database").Key("log_queries").MustBool(false)
|
||||
if !debugSql {
|
||||
engine.SetLogger(&xorm.DiscardLogger{})
|
||||
} else {
|
||||
@@ -181,7 +181,7 @@ func getEngine() (*xorm.Engine, error) {
|
||||
}
|
||||
|
||||
func LoadConfig() {
|
||||
sec := setting.Cfg.Section("database")
|
||||
sec := setting.Raw.Section("database")
|
||||
|
||||
cfgURL := sec.Key("url").String()
|
||||
if len(cfgURL) != 0 {
|
||||
|
||||
Reference in New Issue
Block a user