mirror of
https://github.com/matrix-org/dendrite.git
synced 2026-01-01 03:03:10 -06:00
Use process context
This commit is contained in:
parent
e09019f68c
commit
37b93377b5
|
|
@ -15,7 +15,6 @@
|
|||
package userapi
|
||||
|
||||
import (
|
||||
"context"
|
||||
"time"
|
||||
|
||||
"github.com/gorilla/mux"
|
||||
|
|
@ -90,7 +89,7 @@ func NewInternalAPI(
|
|||
var cleanOldNotifs func()
|
||||
cleanOldNotifs = func() {
|
||||
logrus.Infof("Cleaning old notifications")
|
||||
if err := db.DeleteOldNotifications(context.Background()); err != nil {
|
||||
if err := db.DeleteOldNotifications(base.Context()); err != nil {
|
||||
logrus.WithError(err).Error("Failed to clean old notifications")
|
||||
}
|
||||
time.AfterFunc(time.Hour, cleanOldNotifs)
|
||||
|
|
|
|||
Loading…
Reference in a new issue