1
0
mirror of https://github.com/muety/wakapi.git synced 2023-08-10 21:12:56 +03:00

chore: cap data import according to max data retention time

This commit is contained in:
Ferdinand Mütsch
2022-12-29 12:06:54 +01:00
parent bafbc34706
commit dc0bcbe65d
5 changed files with 51 additions and 7 deletions

View File

@@ -45,11 +45,7 @@ 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
}
// don't clean data for subscribed users or when they otherwise have unlimited data access
if u.MinDataAge().IsZero() {
continue
}