ActionScheduler_Abstract_QueueRunner::memory_exceeded()protectedWC 1.0

Memory exceeded

Ensures the batch process never exceeds 90% of the maximum WordPress memory.

Based on WP_Background_Process::memory_exceeded()

Method of the class: ActionScheduler_Abstract_QueueRunner{}

Hooks from the method

Return

true|false.

Usage

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

ActionScheduler_Abstract_QueueRunner::memory_exceeded() code WC 9.3.3

protected function memory_exceeded() {

	$memory_limit    = $this->get_memory_limit() * 0.90;
	$current_memory  = memory_get_usage( true );
	$memory_exceeded = $current_memory >= $memory_limit;

	return apply_filters( 'action_scheduler_memory_exceeded', $memory_exceeded, $this );
}