Automattic\WooCommerce\Internal\BatchProcessing
BatchProcessingController::process_next_batch_for_single_processor()
Process a batch for a single processor, and handle any required rescheduling or state cleanup.
Метод класса: BatchProcessingController{}
Хуков нет.
Возвращает
null
. Ничего (null).
Использование
// private - только в коде основоного (родительского) класса $result = $this->process_next_batch_for_single_processor( $processor_class_name ): void;
- $processor_class_name(строка) (обязательный)
- Fully qualified class name of the processor.
Код BatchProcessingController::process_next_batch_for_single_processor() BatchProcessingController::process next batch for single processor WC 9.2.3
private function process_next_batch_for_single_processor( string $processor_class_name ): void { if ( ! $this->is_enqueued( $processor_class_name ) ) { return; } $batch_processor = $this->get_processor_instance( $processor_class_name ); $error = $this->process_next_batch_for_single_processor_core( $batch_processor ); $still_pending = count( $batch_processor->get_next_batch_to_process( 1 ) ) > 0; if ( ( $error instanceof \Exception ) ) { // The batch processing failed and no items were processed: // reschedule the processing with a delay, unless this is a repeatead failure. if ( $this->is_consistently_failing( $batch_processor ) ) { $this->log_consistent_failure( $batch_processor, $this->get_process_details( $batch_processor ) ); $this->remove_processor( $processor_class_name ); } else { $this->schedule_batch_processing( $processor_class_name, true ); } throw $error; } if ( $still_pending ) { $this->schedule_batch_processing( $processor_class_name ); } else { $this->dequeue_processor( $processor_class_name ); } }