From fac684335221b04bab10d91be016d6a389104e64 Mon Sep 17 00:00:00 2001 From: Joas Schilling Date: Tue, 14 Sep 2021 11:38:08 +0200 Subject: [PATCH] Increase activity email speed in instances with more than 500 users Signed-off-by: Joas Schilling --- lib/BackgroundJob/EmailNotification.php | 10 +++------- 1 file changed, 3 insertions(+), 7 deletions(-) diff --git a/lib/BackgroundJob/EmailNotification.php b/lib/BackgroundJob/EmailNotification.php index 1ad48c62e..5ae43060a 100644 --- a/lib/BackgroundJob/EmailNotification.php +++ b/lib/BackgroundJob/EmailNotification.php @@ -39,14 +39,10 @@ class EmailNotification extends TimedJob { /** @var bool */ protected $isCLI; - /** - * @param MailQueueHandler $mailQueueHandler - * @param bool $isCLI - */ public function __construct(MailQueueHandler $mailQueueHandler, - $isCLI) { - // Run all 15 Minutes - $this->setInterval(15 * 60); + bool $isCLI) { + // Run everytime cron is executed, so the batching doesn't delay too much + $this->setInterval(1); $this->queueHandler = $mailQueueHandler; $this->isCLI = $isCLI;