mirror of
https://github.com/muety/wakapi.git
synced 2023-08-10 21:12:56 +03:00
fix: dont clean data for subscribed users
This commit is contained in:
parent
195755581b
commit
8ca1404f8b
@ -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 {
|
||||
|
Loading…
Reference in New Issue
Block a user