diff options
Diffstat (limited to 'apps/dav/lib/BackgroundJob/PruneOutdatedSyncTokensJob.php')
-rw-r--r-- | apps/dav/lib/BackgroundJob/PruneOutdatedSyncTokensJob.php | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/apps/dav/lib/BackgroundJob/PruneOutdatedSyncTokensJob.php b/apps/dav/lib/BackgroundJob/PruneOutdatedSyncTokensJob.php index deca55a26cb..9dddc7d644d 100644 --- a/apps/dav/lib/BackgroundJob/PruneOutdatedSyncTokensJob.php +++ b/apps/dav/lib/BackgroundJob/PruneOutdatedSyncTokensJob.php @@ -52,9 +52,10 @@ class PruneOutdatedSyncTokensJob extends TimedJob { public function run($argument) { $limit = max(1, (int) $this->config->getAppValue(Application::APP_ID, 'totalNumberOfSyncTokensToKeep', '10000')); + $retention = max(7, (int) $this->config->getAppValue(Application::APP_ID, 'syncTokensRetentionDays', '60')) * 24 * 3600; - $prunedCalendarSyncTokens = $this->calDavBackend->pruneOutdatedSyncTokens($limit); - $prunedAddressBookSyncTokens = $this->cardDavBackend->pruneOutdatedSyncTokens($limit); + $prunedCalendarSyncTokens = $this->calDavBackend->pruneOutdatedSyncTokens($limit, $retention); + $prunedAddressBookSyncTokens = $this->cardDavBackend->pruneOutdatedSyncTokens($limit, $retention); $this->logger->info('Pruned {calendarSyncTokensNumber} calendar sync tokens and {addressBooksSyncTokensNumber} address book sync tokens', [ 'calendarSyncTokensNumber' => $prunedCalendarSyncTokens, |