diff options
author | dartcafe <github@dartcafe.de> | 2020-01-13 10:28:41 +0300 |
---|---|---|
committer | dartcafe <github@dartcafe.de> | 2020-01-13 10:28:41 +0300 |
commit | 8475852614b67d3c7eaed3db7cec50a6ae1607bc (patch) | |
tree | ff3b22374aca25fd06c4b02f418c1bfc8688f715 /lib/Cron | |
parent | 3b4c8975acee83e3e6943fdb02c098563f3d8762 (diff) |
fixed notification cron
Diffstat (limited to 'lib/Cron')
-rw-r--r-- | lib/Cron/NotificationCron.php | 15 |
1 files changed, 3 insertions, 12 deletions
diff --git a/lib/Cron/NotificationCron.php b/lib/Cron/NotificationCron.php index 27a9677b..e5ddbe13 100644 --- a/lib/Cron/NotificationCron.php +++ b/lib/Cron/NotificationCron.php @@ -23,27 +23,20 @@ namespace OCA\Polls\Cron; -use Exception; - -use OCP\ILogger; -use OCP\BackgroundJob\TimedJob; - +use OC\BackgroundJob\TimedJob; use OCA\Polls\Service\MailService; class NotificationCron extends TimedJob { /** @var MailService*/ private $mailService; - private $logger; /** @param MailService $mailService */ public function __construct( - ILogger $logger, MailService $mailService ) { - $this->logger = $logger; - $this->setInterval(60); + $this->setInterval(5); $this->mailService = $mailService; } @@ -52,8 +45,6 @@ class NotificationCron extends TimedJob { * @param string $token */ protected function run($arguments) { - if ($this->mailService->sendNotifications()) { - $this->logger->debug('Notifications sent'); - } + $this->mailService->sendNotifications(); } } |