AddTokenCleanupJob.php 653 B

123456789101112131415161718192021222324252627282930
  1. <?php
  2. declare(strict_types=1);
  3. /**
  4. * SPDX-FileCopyrightText: 2022 Nextcloud GmbH and Nextcloud contributors
  5. * SPDX-License-Identifier: AGPL-3.0-or-later
  6. */
  7. namespace OC\Repair\NC24;
  8. use OC\Authentication\Token\TokenCleanupJob;
  9. use OCP\BackgroundJob\IJobList;
  10. use OCP\Migration\IOutput;
  11. use OCP\Migration\IRepairStep;
  12. class AddTokenCleanupJob implements IRepairStep {
  13. private IJobList $jobList;
  14. public function __construct(IJobList $jobList) {
  15. $this->jobList = $jobList;
  16. }
  17. public function getName(): string {
  18. return 'Add token cleanup job';
  19. }
  20. public function run(IOutput $output) {
  21. $this->jobList->add(TokenCleanupJob::class);
  22. }
  23. }