[GITEA] Add slow SQL query warning (squash) Fix setting typo
- Fix typo in the slow query threshold setting, add a deprecation warning. - Resolves #2203 (cherry picked from commit 02f6608e5fc21a0a00da5fc4c99152d43ee2ea4d) (cherry picked from commit 4e8f6b2ffdb25e0257933ee0a1bd21e3f4e86740)
This commit is contained in:
parent
464ae81a36
commit
6fb55e9c08
3 changed files with 31 additions and 25 deletions
|
@ -147,9 +147,9 @@ func InitEngine(ctx context.Context) error {
|
|||
xormEngine.SetConnMaxLifetime(setting.Database.ConnMaxLifetime)
|
||||
xormEngine.SetDefaultContext(ctx)
|
||||
|
||||
if setting.Database.SlowQueryTreshold > 0 {
|
||||
if setting.Database.SlowQueryThreshold > 0 {
|
||||
xormEngine.AddHook(&SlowQueryHook{
|
||||
Treshold: setting.Database.SlowQueryTreshold,
|
||||
Treshold: setting.Database.SlowQueryThreshold,
|
||||
Logger: log.GetLogger("xorm"),
|
||||
})
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue