ActionScheduler_WPCLI_QueueRunner::maybe_stop_the_insanity()protectedWC 1.0

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

Method of the class: ActionScheduler_WPCLI_QueueRunner{}

No Hooks.

Return

null. Nothing (null).

Usage

// protected - for code of main (parent) or child class
$result = $this->maybe_stop_the_insanity();

ActionScheduler_WPCLI_QueueRunner::maybe_stop_the_insanity() code WC 9.3.3

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();
	}
}