Server: Add health check route (#26999)
* Server: Add health check route Signed-off-by: Arve Knudsen <arve.knudsen@gmail.com> * Server: Remove health check middleware Signed-off-by: Arve Knudsen <arve.knudsen@gmail.com>
This commit is contained in:
@@ -32,7 +32,6 @@ func GetDataSourceById(query *models.GetDataSourceByIdQuery) error {
|
||||
|
||||
datasource := models.DataSource{OrgId: query.OrgId, Id: query.Id}
|
||||
has, err := x.Get(&datasource)
|
||||
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
@@ -52,6 +52,7 @@ func (ss *SqlStore) WithDbSession(ctx context.Context, callback dbTransactionFun
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
defer sess.Close()
|
||||
|
||||
return callback(sess)
|
||||
}
|
||||
|
||||
@@ -11,7 +11,7 @@ import (
|
||||
"xorm.io/xorm"
|
||||
)
|
||||
|
||||
// WithTransactionalDbSession calls the callback with an session within a transaction
|
||||
// WithTransactionalDbSession calls the callback with a session within a transaction.
|
||||
func (ss *SqlStore) WithTransactionalDbSession(ctx context.Context, callback dbTransactionFunc) error {
|
||||
return inTransactionWithRetryCtx(ctx, ss.engine, callback, 0)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user