WordPress как на ладони
Недорогой хостинг для сайтов на WordPress: wordpress.jino.ru
функция не описана

ActionScheduler_QueueRunner::do_batch() protected WC 1.0

Process a batch of actions pending in the queue.

Ищем WP-разработчика! Фулл-тайм, удаленка, хорошая зарплата, соц. пакет. Подробности.
Компания Boosta.

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().

{} Это метод класса: ActionScheduler_QueueRunner{}

Хуков нет.


int. The number of actions processed.


// protected - в коде основоного (родительского) или дочернего класса
$result = $this->do_batch( $size, $context );
The maximum number of actions to process in the batch.
По умолчанию: 100
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.
По умолчанию: ''

Код ActionScheduler_QueueRunner::do_batch() WC 5.8.0

protected function do_batch( $size = 100, $context = '' ) {
	$claim = $this->store->stake_claim($size);
	$processed_actions = 0;

	foreach ( $claim->get_actions() as $action_id ) {
		// bail if we lost the claim
		if ( ! in_array( $action_id, $this->store->find_actions_by_claim_id( $claim->get_id() ) ) ) {
		$this->process_action( $action_id, $context );

		if ( $this->batch_limits_exceeded( $processed_actions ) ) {
	return $processed_actions;