action_scheduler_timeout_period хук-фильтрWC 1.0

Unclaim pending actions that have not been run within a given time limit.

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_timeout_period', 'wp_kama_action_scheduler_timeout_period_filter' );

/**
 * Function for `action_scheduler_timeout_period` filter-hook.
 * 
 * @param int $time_limit The number of seconds to allow a queue to run before unclaiming its pending actions.
 *
 * @return int
 */
function wp_kama_action_scheduler_timeout_period_filter( $time_limit ){

	// filter...
	return $time_limit;
}
$time_limit(int)
The number of seconds to allow a queue to run before unclaiming its pending actions.
По умолчанию: 300 (5 minutes)

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

ActionScheduler_QueueCleaner::reset_timeouts()
action_scheduler_timeout_period
woocommerce/packages/action-scheduler/classes/ActionScheduler_QueueCleaner.php 158
$timeout = apply_filters( 'action_scheduler_timeout_period', $time_limit );

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

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