This commit is contained in:
ponzischeme89
2026-08-19 06:57:59 +12:00
parent 8c847c59b8
commit 2b43b9ef12
94 changed files with 6359 additions and 778 deletions
+16
View File
@@ -51,6 +51,22 @@ func (s *Server) RegisterHousekeeping(sched *scheduler.Scheduler) {
},
})
// The outbound notification history, which is a different table from the one above:
// that prunes the operator's activity feed, this prunes the record of what Memby sent
// to viewers and to external services.
sched.Register(scheduler.Task{
ID: "notification-log-retention",
Name: "Notification history retention",
Group: "Housekeeping",
Description: fmt.Sprintf("Removes outbound notification records older than %d days.",
int(store.NotificationRetention/(24*time.Hour))),
Interval: 24 * time.Hour,
Run: func(ctx context.Context) (string, error) {
removed, err := s.store.PruneNotificationLog(ctx, store.NotificationRetention)
return countDetail(removed, "notification record"), err
},
})
sched.Register(scheduler.Task{
ID: "device-activity-cleanup",
Name: "Device activity cleanup",