diff options
Diffstat (limited to 'apps/dav/lib/BackgroundJob/EventReminderJob.php')
-rw-r--r-- | apps/dav/lib/BackgroundJob/EventReminderJob.php | 23 |
1 files changed, 13 insertions, 10 deletions
diff --git a/apps/dav/lib/BackgroundJob/EventReminderJob.php b/apps/dav/lib/BackgroundJob/EventReminderJob.php index b67a5d970bb..ab7dadd8c0b 100644 --- a/apps/dav/lib/BackgroundJob/EventReminderJob.php +++ b/apps/dav/lib/BackgroundJob/EventReminderJob.php @@ -1,4 +1,7 @@ <?php + +declare(strict_types=1); + /** * @copyright Copyright (c) 2016 Thomas Citharel <nextcloud@tcit.fr> * @@ -23,8 +26,9 @@ */ namespace OCA\DAV\BackgroundJob; -use OC\BackgroundJob\TimedJob; use OCA\DAV\CalDAV\Reminder\ReminderService; +use OCP\AppFramework\Utility\ITimeFactory; +use OCP\BackgroundJob\TimedJob; use OCP\IConfig; class EventReminderJob extends TimedJob { @@ -35,17 +39,16 @@ class EventReminderJob extends TimedJob { /** @var IConfig */ private $config; - /** - * EventReminderJob constructor. - * - * @param ReminderService $reminderService - * @param IConfig $config - */ - public function __construct(ReminderService $reminderService, IConfig $config) { + public function __construct(ITimeFactory $time, + ReminderService $reminderService, + IConfig $config) { + parent::__construct($time); $this->reminderService = $reminderService; $this->config = $config; - /** Run every 5 minutes */ - $this->setInterval(5); + + // Run every 5 minutes + $this->setInterval(5 * 60); + $this->setTimeSensitivity(self::TIME_SENSITIVE); } /** |