WordPress как на ладони
Недорогой хостинг для сайтов на WordPress: wordpress.jino.ru
функция не описана

ActionScheduler_QueueCleaner::mark_failures() public WC 1.0

Mark actions that have been running for more than a given time limit as failed, based on the assumption some uncatachable and unloggable fatal error occurred during processing.

When called by ActionScheduler_Abstract_QueueRunner::run_cleanup(), the time limit passed as a parameter is 10x the time limit used for queue processing.

Это метод класса: ActionScheduler_QueueCleaner{}

Возвращает

Null. Ничего.

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

$ActionScheduler_QueueCleaner = new ActionScheduler_QueueCleaner();
$ActionScheduler_QueueCleaner->mark_failures( $time_limit );
$time_limit(число)
The number of seconds to allow an action to run before it is considered to have failed.
По умолчанию: 300 (5 minutes)

Код ActionScheduler_QueueCleaner::mark_failures() WC 4.5.2

woocommerce/packages/action-scheduler/classes/ActionScheduler_QueueCleaner.php
<?php
public function mark_failures( $time_limit = 300 ) {
	$timeout = apply_filters( 'action_scheduler_failure_period', $time_limit );
	if ( $timeout < 0 ) {
		return;
	}
	$cutoff = as_get_datetime_object($timeout.' seconds ago');
	$actions_to_reset = $this->store->query_actions( array(
		'status'           => ActionScheduler_Store::STATUS_RUNNING,
		'modified'         => $cutoff,
		'modified_compare' => '<=',
		'per_page'         => $this->get_batch_size(),
	) );

	foreach ( $actions_to_reset as $action_id ) {
		$this->store->mark_failure( $action_id );
		do_action( 'action_scheduler_failed_action', $action_id, $timeout );
	}
}