12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061 |
- <?php
- declare(strict_types=1);
- namespace OCA\Files\BackgroundJob;
- use OCA\Files\Controller\OpenLocalEditorController;
- use OCA\Files\Db\OpenLocalEditorMapper;
- use OCP\AppFramework\Utility\ITimeFactory;
- use OCP\BackgroundJob\IJob;
- use OCP\BackgroundJob\TimedJob;
- class DeleteExpiredOpenLocalEditor extends TimedJob {
- protected OpenLocalEditorMapper $mapper;
- public function __construct(
- ITimeFactory $time,
- OpenLocalEditorMapper $mapper
- ) {
- parent::__construct($time);
- $this->mapper = $mapper;
-
- $this->interval = 12 * 3600;
- $this->setTimeSensitivity(IJob::TIME_INSENSITIVE);
- }
-
- public function run($argument): void {
- $this->mapper->deleteExpiredTokens($this->time->getTime());
- }
- }
|