Save the correct datetime value for newsletter sentAt column
We don't need to use the value from `processedAt` here since we can rightfully use the current datetime value Also, I found out `processedAt` is usually null here for standard newsletters which cause new Carbon to use the server datetime settings MAILPOET-5795
This commit is contained in:
committed by
Aschepikov
parent
639d779088
commit
c76c8f2abb
@ -272,7 +272,7 @@ class SendingQueue {
|
||||
);
|
||||
$queue->removeSubscribers($subscribersToRemove);
|
||||
if (!$queue->countToProcess) {
|
||||
$this->newsletterTask->markNewsletterAsSent($newsletterEntity, $queue);
|
||||
$this->newsletterTask->markNewsletterAsSent($newsletterEntity);
|
||||
continue;
|
||||
}
|
||||
// if there aren't any subscribers to process in batch (e.g. all unsubscribed or were deleted) continue with next batch
|
||||
@ -312,7 +312,7 @@ class SendingQueue {
|
||||
'completed newsletter sending',
|
||||
['newsletter_id' => $newsletter->id, 'task_id' => $queue->taskId]
|
||||
);
|
||||
$this->newsletterTask->markNewsletterAsSent($newsletterEntity, $queue);
|
||||
$this->newsletterTask->markNewsletterAsSent($newsletterEntity);
|
||||
$this->statsNotificationsScheduler->schedule($newsletterEntity);
|
||||
}
|
||||
$this->enforceSendingAndExecutionLimits($timer);
|
||||
|
Reference in New Issue
Block a user