Simplify fetching subscriber IDs
[MAILPOET-5737]
This commit is contained in:
@@ -258,12 +258,11 @@ class SendingQueue {
|
|||||||
}
|
}
|
||||||
|
|
||||||
$foundSubscribers = $queryBuilder->getQuery()->getResult();
|
$foundSubscribers = $queryBuilder->getQuery()->getResult();
|
||||||
$foundSubscribersIds = array_filter(
|
$foundSubscribersIds = array_map(function(SubscriberEntity $subscriber) {
|
||||||
array_map(function(SubscriberEntity $subscriber) {
|
return $subscriber->getId();
|
||||||
return (!empty($subscriber->getId())) ? $subscriber->getId() : false;
|
}, $foundSubscribers);
|
||||||
}, $foundSubscribers)
|
|
||||||
);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// if some subscribers weren't found, remove them from the processing list
|
// if some subscribers weren't found, remove them from the processing list
|
||||||
if (count($foundSubscribersIds) !== count($subscribersToProcessIds)) {
|
if (count($foundSubscribersIds) !== count($subscribersToProcessIds)) {
|
||||||
$subscribersToRemove = array_diff(
|
$subscribersToRemove = array_diff(
|
||||||
|
Reference in New Issue
Block a user