Data sources: Use SQL store directly, not via bus (#27000)

* Server: Make it possible to avoid getting SQL store via bus

Co-authored-by: Emil Tullstedt <emil.tullstedt@grafana.com>
This commit is contained in:
Arve Knudsen
2020-08-21 09:30:06 +02:00
committed by GitHub
parent a73e6f728d
commit 45adfe7732
4 changed files with 41 additions and 16 deletions

View File

@ -70,7 +70,7 @@ func (ss *SqlStore) Init() error {
engine, err := ss.getEngine()
if err != nil {
return fmt.Errorf("Fail to connect to database: %v", err)
return errutil.Wrap("failed to connect to database", err)
}
ss.engine = engine
@ -91,7 +91,7 @@ func (ss *SqlStore) Init() error {
}
if err := migrator.Start(); err != nil {
return fmt.Errorf("Migration failed err: %v", err)
return errutil.Wrap("migration failed", err)
}
// Init repo instances