ActionScheduler_WPCLI_QueueRunner::maybe_stop_the_insanity()protectedWC 1.0

Maybe trigger the stop_the_insanity() method to free up memory.

Метод класса: ActionScheduler_WPCLI_QueueRunner{}

Хуков нет.

Возвращает

null. Ничего (null).

Использование

// protected - в коде основоного (родительского) или дочернего класса
$result = $this->maybe_stop_the_insanity();

Код ActionScheduler_WPCLI_QueueRunner::maybe_stop_the_insanity() WC 8.7.0

protected function maybe_stop_the_insanity() {
	// The value returned by progress_bar->current() might be padded. Remove padding, and convert to int.
	$current_iteration = intval( trim( $this->progress_bar->current() ) );
	if ( 0 === $current_iteration % 50 ) {
		$this->stop_the_insanity();
	}
}