Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
The library for repeatable and retryable operations
PHP
branch: master

Fetching latest commit…

Cannot retrieve the latest commit at this time

Failed to load latest commit information.
src/Batch/Retry
tests
.gitignore
.travis.yml
README.md
composer.json
phpunit.xml.dist

README.md

Batch

The library for repeatable and retryable operations.

Build Status

Here is a simple example:

<?php

use Batch\Retry\RetryProxy;
use Batch\Retry\Policy\SimpleRetryPolicy;
use Batch\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
});
Something went wrong with that request. Please try again.