Automattic\WooCommerce\Internal\BatchProcessing
BatchProcessingController::log_consistent_failure()
Creates log entry with details about a batch processor that is consistently failing.
Method of the class: BatchProcessingController{}
No Hooks.
Return
null
. Nothing (null).
Usage
// private - for code of main (parent) class only $result = $this->log_consistent_failure( $batch_processor, $process_details ): void;
- $batch_processor(BatchProcessorInterface) (required)
- The batch processor instance.
- $process_details(array) (required)
- Failing process details.
Changelog
Since 9.1.0 | Introduced. |
BatchProcessingController::log_consistent_failure() BatchProcessingController::log consistent failure code WC 9.2.3
private function log_consistent_failure( BatchProcessorInterface $batch_processor, array $process_details ): void { $this->logger->error( "Batch processor {$batch_processor->get_name()} appears to be failing consistently: {$process_details['recent_failures']} unsuccessful attempt(s). No further attempts will be made.", array( 'source' => 'batch-processing', 'failures' => $process_details['recent_failures'], 'first_failure' => $process_details['batch_first_failure'], 'last_failure' => $process_details['batch_last_failure'], ) ); }