WordPress как на ладони
Недорогой хостинг для сайтов на WordPress: wordpress.jino.ru
функция не описана


Middleware::retry() public Yoast 1.0

Middleware that retries requests based on the boolean result of invoking the provided "decider" function.

If no delay function is provided, a simple implementation of exponential backoff will be utilized.

{} Это метод класса: Middleware{}

Хуков нет.


callable. Returns a function that accepts the next handler.


$result = Middleware::retry( $decider, $delay );
$decider(callable) (обязательный)
Function that accepts the number of retries, a request, [response], and [exception] and returns true if the request is to be retried.
Function that accepts the number of retries and returns the number of milliseconds to delay.
По умолчанию: null

Код Middleware::retry() Yoast 15.6.2

public static function retry(callable $decider, callable $delay = null)
    return function (callable $handler) use($decider, $delay) {
        return new \YoastSEO_Vendor\GuzzleHttp\RetryMiddleware($decider, $handler, $delay);