action_scheduler_failed_action

ACTION woocommerce\packages\action-scheduler\classes\ActionScheduler_QueueCleaner.php (ligne 226) github
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.

Paramètres

Entrée :
$action_id, $timeout
Sortie :
@param int $time_limit The number of seconds to allow an action to run before it is considered to have failed. Default 300 (5 minutes).

Utilisation

// Ajouter une fonction au hook action 'action_scheduler_failed_action'
add_action('action_scheduler_failed_action', 'ma_fonction_personnalisee', 10, 1);

function ma_fonction_personnalisee($action_id, $timeout) {
    // Votre code ici
    error_log('Hook action_scheduler_failed_action déclenché');
}

Actualités

Chargement des actualités...