<?php namespace MailPoet\Tasks; if (!defined('ABSPATH')) exit; use MailPoet\Models\ScheduledTask; use MailPoet\Models\ScheduledTaskSubscriber; use MailPoet\Models\Subscriber; class Bounce { public static function prepareSubscribers(ScheduledTask $task) { // Prepare subscribers on the DB side for performance reasons Subscriber::rawExecute( 'INSERT IGNORE INTO ' . MP_SCHEDULED_TASK_SUBSCRIBERS_TABLE . ' (task_id, subscriber_id, processed) SELECT ? as task_id, s.`id` as subscriber_id, ? as processed FROM ' . MP_SUBSCRIBERS_TABLE . ' s WHERE s.`deleted_at` IS NULL AND s.`status` IN (?, ?)', [ $task->id, ScheduledTaskSubscriber::STATUS_UNPROCESSED, Subscriber::STATUS_SUBSCRIBED, Subscriber::STATUS_UNCONFIRMED, ] ); } }
Name | Type | Size | Permission | Actions |
---|---|---|---|---|
Subscribers | Folder | 0755 |
|
|
Bounce.php | File | 830 B | 0644 |
|
Sending.php | File | 8.94 KB | 0644 |
|
State.php | File | 3.13 KB | 0644 |
|
Subscribers.php | File | 1.65 KB | 0644 |
|
index.php | File | 0 B | 0644 |
|