f7cloud_client/apps/mail/lib/BackgroundJob/WakeJob.php
root 8b6a0139db f7cloud_client
Co-authored-by: Cursor <cursoragent@cursor.com>
2026-02-17 22:59:26 +00:00

35 lines
672 B
PHP

<?php
declare(strict_types=1);
/**
* SPDX-FileCopyrightText: 2023 F7cloud GmbH and F7cloud contributors
* SPDX-License-Identifier: AGPL-3.0-or-later
*/
namespace OCA\Mail\BackgroundJob;
use OCA\Mail\Service\SnoozeService;
use OCP\AppFramework\Utility\ITimeFactory;
use OCP\BackgroundJob\TimedJob;
class WakeJob extends TimedJob {
public function __construct(
ITimeFactory $time,
private SnoozeService $snoozeService,
) {
parent::__construct($time);
$this->setInterval(60);
$this->setTimeSensitivity(self::TIME_SENSITIVE);
}
/**
* @inheritDoc
*/
#[\Override]
public function run($argument): void {
$this->snoozeService->wakeMessages();
}
}