ActionScheduler_Abstract_QueueRunner::fetch_complete_action
Fetches the action instance. On failure returns null instead of ActionScheduler_NullAction.
Метод класса: ActionScheduler_Abstract_QueueRunner{}
Хуков нет.
Возвращает
ActionScheduler_Action|null.
Использование
// private - только в коде основоного (родительского) класса $result = $this->fetch_complete_action( $action_id );
- $action_id(int) (обязательный)
- Action ID.
Код ActionScheduler_Abstract_QueueRunner::fetch_complete_action() ActionScheduler Abstract QueueRunner::fetch complete action WC 11.1.1
private function fetch_complete_action( int $action_id ) {
// Handle corrupted entries and potential DB read failures (corrupted arguments or schedule data; a known trigger is incomplete A-S migration).
$attempts_to_populate = 0;
do {
$action = $this->store->fetch_action( $action_id );
$failure = $action instanceof ActionScheduler_NullAction;
// Sleep 0.01 second before retrying.
usleep( 10000 * (int) $failure );
} while ( $failure && ++$attempts_to_populate < 2 );
return $action instanceof ActionScheduler_NullAction ? null : $action;
}