run send reminders background-job only when mode is not set to occ

Signed-off-by: Georg Ehrke <developer@georgehrke.com>
This commit is contained in:
Georg Ehrke 2019-08-02 16:26:51 +02:00 committed by Roeland Jago Douma
parent d74315ac3d
commit 36b9b51297
No known key found for this signature in database
GPG Key ID: F941078878347C0C
1 changed files with 9 additions and 4 deletions

View File

@ -50,10 +50,15 @@ class EventReminderJob extends TimedJob {
* @throws \OCA\DAV\CalDAV\Reminder\NotificationTypeDoesNotExistException
* @throws \OC\User\NoUserException
*/
public function run($arg): void
{
if ($this->config->getAppValue('dav', 'sendEventReminders', 'yes') === 'yes') {
$this->reminderService->processReminders();
public function run($arg):void {
if ($this->config->getAppValue('dav', 'sendEventReminders', 'yes') !== 'yes') {
return;
}
if ($this->config->getAppValue('dav', 'sendEventRemindersMode', 'backgroundjob') !== 'backgroundjob') {
return;
}
$this->reminderService->processReminders();
}
}