v2.2.2
This commit is contained in:
parent
0ece5f3a6d
commit
1e78bb1378
8 changed files with 181 additions and 22 deletions
|
|
@ -27,6 +27,13 @@ class AmazonSES_Mailer extends \NewsletterMailer {
|
|||
*/
|
||||
protected $batch_size = 50;
|
||||
|
||||
/**
|
||||
* Public batch property that Newsletter reads directly.
|
||||
*
|
||||
* @var int
|
||||
*/
|
||||
public $batch = 50;
|
||||
|
||||
/**
|
||||
* Constructor.
|
||||
*
|
||||
|
|
@ -38,6 +45,7 @@ class AmazonSES_Mailer extends \NewsletterMailer {
|
|||
// Configure batch_size from turbo (standard Newsletter pattern).
|
||||
if ( ! empty( $options['turbo'] ) ) {
|
||||
$this->batch_size = max( 1, (int) $options['turbo'] );
|
||||
$this->batch = $this->batch_size; // Newsletter reads this directly.
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -50,6 +58,18 @@ class AmazonSES_Mailer extends \NewsletterMailer {
|
|||
return $this->speed;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get batch size (emails per execution).
|
||||
*
|
||||
* This tells Newsletter how many emails to load and process in each execution.
|
||||
* Critical for queue-based architecture to enqueue all emails at once.
|
||||
*
|
||||
* @return int
|
||||
*/
|
||||
public function get_batch_size() {
|
||||
return $this->batch_size;
|
||||
}
|
||||
|
||||
/**
|
||||
* Enqueue single email to database.
|
||||
*
|
||||
|
|
|
|||
Loading…
Reference in a new issue