- Recalculates the number of processed/to process subscribers if the
original count does not the current count from the database
This commit is contained in:
@@ -55,6 +55,12 @@ class SendingQueue {
|
||||
$subscribers_ids) {
|
||||
$subscribers = Subscriber::whereIn('id', $subscribers_ids)
|
||||
->findArray();
|
||||
// recalculate the number of subscribers if the total to process count
|
||||
// does not match the number of subscribers in the database
|
||||
if (count($subscribers_ids) !== count($subscribers)) {
|
||||
$subscibers_to_exclude = array_diff($subscribers_ids, Helpers::arrayColumn($subscribers, 'id'));
|
||||
$queue->subscribers->to_process = array_diff($queue->subscribers->to_process, $subscibers_to_exclude);
|
||||
}
|
||||
$queue->subscribers = call_user_func_array(
|
||||
array(
|
||||
$this,
|
||||
|
Reference in New Issue
Block a user