* SQLStore: Close session in withDbSession
Signed-off-by: Arve Knudsen <arve.knudsen@gmail.com>
* SQLStore.WithDbSession: Never use session from context
Signed-off-by: Arve Knudsen <arve.knudsen@gmail.com>
(cherry picked from commit 5a0780801b)
Co-authored-by: Arve Knudsen <arve.knudsen@gmail.com>
This commit is contained in:
co-authored by
Arve Knudsen
parent
5d58d0aabb
commit
bc463d6a2f
@@ -510,7 +510,7 @@ func SetAlertNotificationStateToCompleteCommand(ctx context.Context, cmd *models
|
||||
}
|
||||
|
||||
func SetAlertNotificationStateToPendingCommand(ctx context.Context, cmd *models.SetAlertNotificationStateToPendingCommand) error {
|
||||
return withDbSession(ctx, func(sess *DBSession) error {
|
||||
return withDbSession(ctx, x, func(sess *DBSession) error {
|
||||
newVersion := cmd.Version + 1
|
||||
sql := `UPDATE alert_notification_state SET
|
||||
state = ?,
|
||||
|
||||
Reference in New Issue
Block a user