action_scheduler_failure_period
Mark actions that have been running for more than a given time limit as failed, based on the assumption some uncatchable 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.
Usage
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.
Default: 300 (5 minutes)
Where the hook is called
action_scheduler_failure_period
woocommerce/packages/action-scheduler/classes/ActionScheduler_QueueCleaner.php 207
$timeout = apply_filters( 'action_scheduler_failure_period', $time_limit );