fix: make ScheduledNotifications a TimedJob and...

run every 1s.

Signed-off-by: Salvatore Martire <4652631+salmart-dev@users.noreply.github.com>
This commit is contained in:
Salvatore Martire 2025-06-06 16:29:06 +02:00
parent 4bdb2b1dff
commit dc041c530c

View file

@ -13,10 +13,10 @@ use OCA\FilesReminders\Db\ReminderMapper;
use OCA\FilesReminders\Service\ReminderService;
use OCP\AppFramework\Db\DoesNotExistException;
use OCP\AppFramework\Utility\ITimeFactory;
use OCP\BackgroundJob\Job;
use OCP\BackgroundJob\TimedJob;
use Psr\Log\LoggerInterface;
class ScheduledNotifications extends Job {
class ScheduledNotifications extends TimedJob {
public function __construct(
ITimeFactory $time,
protected ReminderMapper $reminderMapper,
@ -24,6 +24,8 @@ class ScheduledNotifications extends Job {
protected LoggerInterface $logger,
) {
parent::__construct($time);
$this->setInterval(60);
}
/**