Skip to content

Commit

Permalink
Merge pull request #1078 from crstauf/fix-1037
Browse files Browse the repository at this point in the history
Batch size should be adjustable during processing
  • Loading branch information
vedanshujain authored Aug 21, 2024
2 parents 46b62b2 + 622d6fe commit 6953ec1
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion classes/ActionScheduler_QueueRunner.php
Original file line number Diff line number Diff line change
Expand Up @@ -135,8 +135,8 @@ public function run( $context = 'WP Cron' ) {

$this->processed_actions_count = 0;
if ( false === $this->has_maximum_concurrent_batches() ) {
$batch_size = apply_filters( 'action_scheduler_queue_runner_batch_size', 25 );
do {
$batch_size = apply_filters( 'action_scheduler_queue_runner_batch_size', 25 );
$processed_actions_in_batch = $this->do_batch( $batch_size, $context );
$this->processed_actions_count += $processed_actions_in_batch;
} while ( $processed_actions_in_batch > 0 && ! $this->batch_limits_exceeded( $this->processed_actions_count ) ); // keep going until we run out of actions, time, or memory.
Expand Down

0 comments on commit 6953ec1

Please sign in to comment.