action_scheduler_failure_period хук-фильтр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.

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

add_filter( 'action_scheduler_failure_period', 'wp_kama_action_scheduler_failure_period_filter' );

/**
 * Function for `action_scheduler_failure_period` filter-hook.
 * 
 * @param int $time_limit The number of seconds to allow an action to run before it is considered to have failed.
 *
 * @return int
 */
function wp_kama_action_scheduler_failure_period_filter( $time_limit ){

	// filter...
	return $time_limit;
}
$time_limit(int)
The number of seconds to allow an action to run before it is considered to have failed.
По умолчанию: 300 (5 minutes)

Где вызывается хук

ActionScheduler_QueueCleaner::mark_failures()
action_scheduler_failure_period
woocommerce/packages/action-scheduler/classes/ActionScheduler_QueueCleaner.php 188
$timeout = apply_filters( 'action_scheduler_failure_period', $time_limit );

Где используется хук в WooCommerce

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