0.2.77
This commit is contained in:
@@ -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",
|
||||
|
||||
Reference in New Issue
Block a user