Nullify engagement score updated at after sends

This will cause the cron job that recalculates engagement score to pick
up these users the next time it runs. This ensures scores don't get
stale.

MAILPOET-5410
This commit is contained in:
John Oleksowicz
2023-07-21 14:38:53 -05:00
committed by Aschepikov
parent 3ec4505445
commit f8e0ba118c

View File

@@ -274,6 +274,8 @@ class SendingQueue {
if (!$isTransactional) {
$now = Carbon::createFromTimestamp((int)current_time('timestamp'));
$this->subscribersRepository->bulkUpdateLastSendingAt($foundSubscribersIds, $now);
// We're nullifying this value so these subscribers' engagement score will be recalculated the next time the cron runs
$this->subscribersRepository->bulkUpdateEngagementScoreUpdatedAt($foundSubscribersIds, null);
}
$this->loggerFactory->getLogger(LoggerFactory::TOPIC_NEWSLETTERS)->info(
'after queue chunk processing',