CleanupLoginFlowV2.php 605 B

12345678910111213141516171819202122232425262728
  1. <?php
  2. declare(strict_types=1);
  3. /**
  4. * SPDX-FileCopyrightText: 2019 Nextcloud GmbH and Nextcloud contributors
  5. * SPDX-License-Identifier: AGPL-3.0-or-later
  6. */
  7. namespace OC\Core\BackgroundJobs;
  8. use OC\Core\Db\LoginFlowV2Mapper;
  9. use OCP\AppFramework\Utility\ITimeFactory;
  10. use OCP\BackgroundJob\TimedJob;
  11. class CleanupLoginFlowV2 extends TimedJob {
  12. public function __construct(
  13. ITimeFactory $time,
  14. private LoginFlowV2Mapper $loginFlowV2Mapper,
  15. ) {
  16. parent::__construct($time);
  17. $this->setInterval(3600);
  18. }
  19. protected function run($argument): void {
  20. $this->loginFlowV2Mapper->cleanup();
  21. }
  22. }