vkartaviy/retry

The library for repeatable and retryable operations

Installs: 218 733

Dependents: 3

Suggesters: 0

Security: 0

Stars: 29

Watchers: 2

Forks: 2

Open Issues: 1

pkg:composer/vkartaviy/retry

v0.2.2 2015-05-06 17:39 UTC

This package is not auto-updated.

Last update: 2025-10-11 23:38:07 UTC


README

The library for repeatable and retryable operations.

Build Status

Here is a simple example:

<?php

use Retry\RetryProxy;
use Retry\Policy\SimpleRetryPolicy;
use Retry\BackOff\ExponentialBackOffPolicy;

$retryPolicy = new SimpleRetryPolicy(3);
$backOffPolicy = new ExponentialBackOffPolicy();

$proxy = new RetryProxy($retryPolicy, $backOffPolicy);
$result = $proxy->call(function() {
    // call external service and return result
});