Skip empty subscribers batches during sending

[MAILPOET-3418]
This commit is contained in:
Rostislav Wolny
2021-03-29 15:55:40 +02:00
committed by Veljko V
parent 5331d76c79
commit bbd4cb98f8
2 changed files with 39 additions and 0 deletions

View File

@ -168,6 +168,10 @@ class SendingQueue {
$this->newsletterTask->markNewsletterAsSent($newsletter, $queue);
continue;
}
// if there aren't any subscribers to process in batch (e.g. all unsubscribed or were deleted) continue with next batch
if (count($foundSubscribersIds) === 0) {
continue;
}
}
$this->loggerFactory->getLogger(LoggerFactory::TOPIC_NEWSLETTERS)->addInfo(
'before queue chunk processing',