Use mailerFactory in SendingQueue Mailer task

[MAILPOET-4115]
This commit is contained in:
Rostislav Wolny
2022-03-30 16:21:40 +02:00
committed by Veljko V
parent 6b758d90e6
commit d4a8315933
6 changed files with 145 additions and 117 deletions

View File

@@ -81,14 +81,14 @@ class SendingQueue {
WPFunctions $wp,
Links $links,
ScheduledTasksRepository $scheduledTasksRepository,
$mailerTask = false,
MailerTask $mailerTask,
$newsletterTask = false
) {
$this->errorHandler = $errorHandler;
$this->throttlingHandler = $throttlingHandler;
$this->statsNotificationsScheduler = $statsNotificationsScheduler;
$this->subscribersFinder = $subscriberFinder;
$this->mailerTask = ($mailerTask) ? $mailerTask : new MailerTask();
$this->mailerTask = $mailerTask;
$this->newsletterTask = ($newsletterTask) ? $newsletterTask : new NewsletterTask();
$this->segmentsRepository = $segmentsRepository;
$this->mailerMetaInfo = new MetaInfo;