ActionScheduler_QueueRunner::do_batch( int $size = 100, string $context = '' )
Process a batch of actions pending in the queue.
Description Description
Actions are processed by claiming a set of pending actions then processing each one until either the batch size is completed, or memory or time limits are reached, defined by @see $this->batch_limits_exceeded().
Parameters Parameters
- $size
-
(Optional) The maximum number of actions to process in the batch.
Default value: 100
- $context
-
(Optional) identifer for the context in which this action is being processed, e.g. 'WP CLI' or 'WP Cron' Generally, this should be capitalised and not localised as it's a proper noun.
Default value: ''
Return Return
(int) The number of actions processed.
Source Source
File: packages/action-scheduler/classes/ActionScheduler_QueueRunner.php