fix: postgres/mysql engine cache was not being used, fixes #12636 (#12642)

This commit is contained in:
Torkel Ödegaard 2018-07-18 07:21:32 -07:00 committed by GitHub
parent ce64a3ccbc
commit e413f026b9
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 4 additions and 1 deletions

View File

@ -63,7 +63,8 @@ datasources:
url: localhost:5432
database: grafana
user: grafana
password: password
secureJsonData:
password: password
jsonData:
sslmode: "disable"
@ -74,3 +75,4 @@ datasources:
authType: credentials
defaultRegion: eu-west-2

View File

@ -68,6 +68,7 @@ func (e *DefaultSqlEngine) InitEngine(driverName string, dsInfo *models.DataSour
engine.SetMaxOpenConns(10)
engine.SetMaxIdleConns(10)
engineCache.versions[dsInfo.Id] = dsInfo.Version
engineCache.cache[dsInfo.Id] = engine
e.XormEngine = engine