AddBruteForceCleanupJob.php 669 B

12345678910111213141516171819202122232425262728293031
  1. <?php
  2. declare(strict_types=1);
  3. /**
  4. * SPDX-FileCopyrightText: 2020 Nextcloud GmbH and Nextcloud contributors
  5. * SPDX-License-Identifier: AGPL-3.0-or-later
  6. */
  7. namespace OC\Repair;
  8. use OC\Security\Bruteforce\CleanupJob;
  9. use OCP\BackgroundJob\IJobList;
  10. use OCP\Migration\IOutput;
  11. use OCP\Migration\IRepairStep;
  12. class AddBruteForceCleanupJob implements IRepairStep {
  13. /** @var IJobList */
  14. protected $jobList;
  15. public function __construct(IJobList $jobList) {
  16. $this->jobList = $jobList;
  17. }
  18. public function getName() {
  19. return 'Add job to cleanup the bruteforce entries';
  20. }
  21. public function run(IOutput $output) {
  22. $this->jobList->add(CleanupJob::class);
  23. }
  24. }