Automattic\WooCommerce\Internal\ProductFeed\Integrations\POSCatalog

AsyncGenerator::raise_resource_limits │ private │ WC 1.0

Raises the memory and execution time limits for the current process before heavy work begins.

These only affect the current process and never lower an already higher limit. They cannot override a hard host/server request timeout or Action Scheduler's failure period.

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

Хуков нет.

Возвращает

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

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

// private - только в коде основоного (родительского) класса
$result = $this->raise_resource_limits(): void;

Код AsyncGenerator::raise_resource_limits() WC 11.2.2

private function raise_resource_limits(): void {
	wp_raise_memory_limit( 'admin' );

	// Raise the time limit up front: the walker only resets it after each batch, so the initial
	// product query and the first batch would otherwise run under the request's (possibly low) limit.
	$batch_time_limit = $this->get_batch_time_limit();
	if ( $batch_time_limit > 0 ) {
		wc_set_time_limit( $batch_time_limit );
	}
}