aboutsummaryrefslogtreecommitdiffstats
path: root/core/BackgroundJobs/CleanupLoginFlowV2.php
blob: e5bcf00a921a32c602de3e04ed2af88a2844e25d (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
<?php

declare(strict_types=1);

/**
 * SPDX-FileCopyrightText: 2019 Nextcloud GmbH and Nextcloud contributors
 * SPDX-License-Identifier: AGPL-3.0-or-later
 */
namespace OC\Core\BackgroundJobs;

use OC\Core\Db\LoginFlowV2Mapper;
use OCP\AppFramework\Utility\ITimeFactory;
use OCP\BackgroundJob\TimedJob;

class CleanupLoginFlowV2 extends TimedJob {
	public function __construct(
		ITimeFactory $time,
		private LoginFlowV2Mapper $loginFlowV2Mapper,
	) {
		parent::__construct($time);

		$this->setInterval(60 * 60);
	}

	protected function run($argument): void {
		$this->loginFlowV2Mapper->cleanup();
	}
}