fix: dont clean data for subscribed users

This commit is contained in:
Ferdinand Mütsch 2022-12-23 14:08:13 +01:00
parent 195755581b
commit 8ca1404f8b
1 changed files with 5 additions and 0 deletions

View File

@ -48,6 +48,11 @@ func (s *HousekeepingService) Schedule() {
// schedule jobs
for _, u := range users {
// don't clean data for subscribed users
if s.config.Subscriptions.Enabled && u.HasActiveSubscription() {
continue
}
user := *u
s.queueWorkers.Dispatch(func() {
if err := s.ClearOldUserData(&user, retentionDuration); err != nil {